mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-07-05 17:32:25 +02:00
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
This commit is contained in:
@@ -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');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user