From 5695654d3512b8b642f93fa4d9509e62e2e132fe Mon Sep 17 00:00:00 2001 From: plegall Date: Tue, 21 Jul 2009 20:07:44 +0000 Subject: 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 --- admin/include/functions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'admin') 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'); } -- cgit v1.2.3