Browse Source

Catch error when calling Import::move

Tobias Reich 10 years ago
parent
commit
830e2362d3
1 changed files with 7 additions and 1 deletions
  1. 7 1
      php/modules/Import.php

+ 7 - 1
php/modules/Import.php

@@ -116,7 +116,13 @@ class Import extends Module {
 
 		if (!isset($path)) $path = LYCHEE_UPLOADS_IMPORT;
 
-		if ($useTemp===true) $path = Import::move($database, $path);
+		if ($useTemp===true) {
+			$path = Import::move($database, $path);
+			if ($path===false) {
+				Log::error($database, __METHOD__, __LINE__, 'Failed to move import to temporary directory');
+				return false;
+			}
+		}
 
 		$error				= false;
 		$contains['photos']	= false;