From: Aaron Schulz Date: Sun, 7 Sep 2008 00:38:57 +0000 (+0000) Subject: Add more error handling X-Git-Tag: 1.31.0-rc.0~45430 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/operations/?a=commitdiff_plain;h=ef3baf4e62bd7d19fe466cd91b9fa25572e8707f;p=lhc%2Fweb%2Fwiklou.git Add more error handling --- diff --git a/includes/filerepo/FileRepo.php b/includes/filerepo/FileRepo.php index 23a132eae5..02d0d1fbb0 100644 --- a/includes/filerepo/FileRepo.php +++ b/includes/filerepo/FileRepo.php @@ -101,7 +101,7 @@ abstract class FileRepo { # Now try an old version of the file if ( $time !== false ) { $img = $this->newFile( $title, $time ); - if ( $img->exists() ) { + if ( $img && $img->exists() ) { if ( !$img->isDeleted(File::DELETED_FILE) ) { return $img; } else if ( ($flags & FileRepo::FIND_PRIVATE) && $img->userCan(File::DELETED_FILE) ) {