aboutsummaryrefslogtreecommitdiffstats
path: root/admin
diff options
context:
space:
mode:
authorplegall <plg@piwigo.org>2009-07-21 20:07:44 +0000
committerplegall <plg@piwigo.org>2009-07-21 20:07:44 +0000
commit5695654d3512b8b642f93fa4d9509e62e2e132fe (patch)
treeceeb46b68b004d7671d675e8de8391d77a309d31 /admin
parentd8f1c262de1d9907890e6e8bbb6212ce6d93b5c3 (diff)
feature 953: avoid fatal error when delete a photo (added with pwg.images.add
API) and the file doesn't not exist on the filesystem. git-svn-id: http://piwigo.org/svn/branches/2.0@3656 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'admin')
-rw-r--r--admin/include/functions.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/admin/include/functions.php b/admin/include/functions.php
index 4178a285f..63a79a2bf 100644
--- a/admin/include/functions.php
+++ b/admin/include/functions.php
@@ -171,7 +171,7 @@ SELECT
foreach (array($file_path, $thumbnail_path, $high_path) as $path)
{
- if (isset($path) and !unlink($path))
+ if (isset($path) and is_file($path) and !unlink($path))
{
die('"'.$path.'" cannot be removed');
}