Changeset 3656


Ignore:
Timestamp:
07/21/09 22:07:44 (10 years ago)
Author:
plg
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.0/admin/include/functions.php

    r3620 r3656  
    172172      foreach (array($file_path, $thumbnail_path, $high_path) as $path) 
    173173      { 
    174         if (isset($path) and !unlink($path)) 
     174        if (isset($path) and is_file($path) and !unlink($path)) 
    175175        { 
    176176          die('"'.$path.'" cannot be removed'); 
Note: See TracChangeset for help on using the changeset viewer.