summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorsteckbrief <steckbrief@chefmail.de>2017-12-25 22:35:35 +0100
committersteckbrief <steckbrief@chefmail.de>2017-12-25 22:35:35 +0100
commitd87f45b828cf0d2eeb8a641b411bbf210aba36b1 (patch)
tree821c25b2970445b09b6c5cf4d6c0056d10b4b0e7 /lib
parent39b7f245baadecbc3aad47e0273ce933ef3acc00 (diff)
adding better check for uploaded file
Diffstat (limited to 'lib')
-rw-r--r--lib/functions.stories.inc.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/functions.stories.inc.php b/lib/functions.stories.inc.php
index b882869..5e0527e 100644
--- a/lib/functions.stories.inc.php
+++ b/lib/functions.stories.inc.php
@@ -22,8 +22,10 @@ function createEntity($path, $description, $file, $filename) {
// Error on writing description file
}
// move uploaded logo
- if (NULL === $file || move_uploaded_file($file['tmp_name'], $path.DIRECTORY_SEPARATOR.$filename)) {
+ if (NULL === $file || move_uploaded_file($file['tmp_name'], $path.DIRECTORY_SEPARATOR.$filename) || $file['error'] == UPLOAD_ERR_NO_FILE) {
return TRUE;
+ } else {
+ return 3;
}
} else {
// Error on directory creation