summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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