diff options
author | Phie <phie@phie.ovh> | 2018-09-11 01:27:11 +0300 |
---|---|---|
committer | Phie <phie@phie.ovh> | 2018-09-11 01:27:11 +0300 |
commit | d23132095626a5bb7ccbd4cb5122d14ea9633248 (patch) | |
tree | 9c4c3c3408689f7896ae799e84b1a07655ada331 /lib | |
parent | bf369db719009d84a7f052cbf6ebac972057eab4 (diff) |
KO wasn't a good message (and wasn't returning any error code)
Diffstat (limited to 'lib')
-rwxr-xr-x | lib/Controller/NoteController.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Controller/NoteController.php b/lib/Controller/NoteController.php index 8ca3915..16f9282 100755 --- a/lib/Controller/NoteController.php +++ b/lib/Controller/NoteController.php @@ -472,7 +472,7 @@ } $fileIn = fopen($_FILES['media']['tmp_name'][0],"r"); if (!$fileIn) { - die("KO"); + throw new Exception('Media doesn\'t exist'); } else { $fileOut = $data->newFile($_FILES['media']['name'][0]); $fileOut->putContent($fileIn); |