From 830e2362d314aa107c415cbb1bf385556c9d9f67 Mon Sep 17 00:00:00 2001 From: Tobias Reich Date: Sat, 17 May 2014 22:48:06 +0200 Subject: [PATCH] Catch error when calling Import::move --- php/modules/Import.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/php/modules/Import.php b/php/modules/Import.php index 4d28226..5e91e36 100644 --- a/php/modules/Import.php +++ b/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;