From 399619c6e8b0d6c4db0ac67be600386865440a5b Mon Sep 17 00:00:00 2001 From: Quentin Ligier Date: Sat, 19 Mar 2016 10:21:29 +0100 Subject: [PATCH] Corrections of Import::url --- php/Modules/Import.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/php/Modules/Import.php b/php/Modules/Import.php index 76adf19..c0d1a32 100644 --- a/php/Modules/Import.php +++ b/php/Modules/Import.php @@ -65,13 +65,12 @@ final class Import { continue; } - $pathinfo = pathinfo($url); - $filename = $pathinfo['filename'] . '.' . $pathinfo['extension']; + $filename = pathinfo($url, PATHINFO_FILENAME) . $extension; $tmp_name = LYCHEE_DATA . $filename; if (@copy($url, $tmp_name)===false) { $error = true; - Log::error(Database::get(), __METHOD__, __LINE__, 'Could not copy file (' . $tmp_name . ') to temp-folder (' . $tmp_name . ')'); + Log::error(Database::get(), __METHOD__, __LINE__, 'Could not copy file (' . $url . ') to temp-folder (' . $tmp_name . ')'); continue; }