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:
Chris Morgan
2007-06-09 22:17:32 +00:00
committed by WineHQ
parent 4cbbb2fbb6
commit ea2de6fe3c
2 changed files with 9 additions and 2 deletions

View File

@@ -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);
}