From: Aaron Schulz Date: Tue, 12 Aug 2008 17:32:37 +0000 (+0000) Subject: $thumb could be null X-Git-Tag: 1.31.0-rc.0~45936 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/operations/?a=commitdiff_plain;h=19e07566f8cc646f1624cb274a8a52682635ec9b;p=lhc%2Fweb%2Fwiklou.git $thumb could be null --- diff --git a/includes/filerepo/File.php b/includes/filerepo/File.php index 5b9a71e10c..b82f1c4101 100644 --- a/includes/filerepo/File.php +++ b/includes/filerepo/File.php @@ -582,7 +582,7 @@ abstract class File { // Purge. Useful in the event of Core -> Squid connection failure or squid // purge collisions from elsewhere during failure. Don't keep triggering for // "thumbs" which have the main image URL though (bug 13776) - if ( $wgUseSquid && ($thumb->isError() || $thumb->getUrl() != $this->getURL()) ) { + if ( $wgUseSquid && ( !$thumb || $thumb->isError() || $thumb->getUrl() != $this->getURL()) ) { SquidUpdate::purge( array( $thumbUrl ) ); } } while (false);