Screenshot::delete() and Image::delete() should check if the file exists before attempting to
call unlink() on it. Fixes three php errors that occur during the unit tests.
This commit is contained in:
@@ -391,7 +391,9 @@ class Image {
|
||||
*/
|
||||
function delete()
|
||||
{
|
||||
unlink($this->sFile);
|
||||
// if the file exists, delete it
|
||||
if(is_file($this->sFile))
|
||||
unlink($this->sFile);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user