Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/CarnetApp/CarnetNextcloud.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorPhie <phie@phie.ovh>2018-09-11 01:27:11 +0300
committerPhie <phie@phie.ovh>2018-09-11 01:27:11 +0300
commitd23132095626a5bb7ccbd4cb5122d14ea9633248 (patch)
tree9c4c3c3408689f7896ae799e84b1a07655ada331 /lib
parentbf369db719009d84a7f052cbf6ebac972057eab4 (diff)
KO wasn't a good message (and wasn't returning any error code)
Diffstat (limited to 'lib')
-rwxr-xr-xlib/Controller/NoteController.php2
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);