From: Brion Vibber Date: Wed, 6 Apr 2011 18:27:20 +0000 (+0000) Subject: Fix regression from r81558: fatal error in ForeignFileRepo thumb fetching when thumb... X-Git-Tag: 1.31.0-rc.0~30995 X-Git-Url: http://git.cyclocoop.org/%7B%24admin_url%7Dmes_infos.php?a=commitdiff_plain;h=dc1f7fd88cfee7faa8336e6684ebf5b7f7c6c1a7;p=lhc%2Fweb%2Fwiklou.git Fix regression from r81558: fatal error in ForeignFileRepo thumb fetching when thumb caching is disabled. Addition of optional parameters lead to passing default 'null' straight through on a reference parameter, which PHP 5.3 really disapproves of. Sticking in a temp variable resolves this easily. --- diff --git a/includes/filerepo/ForeignAPIRepo.php b/includes/filerepo/ForeignAPIRepo.php index 35a0ffd898..55b1be302f 100644 --- a/includes/filerepo/ForeignAPIRepo.php +++ b/includes/filerepo/ForeignAPIRepo.php @@ -231,7 +231,8 @@ class ForeignAPIRepo extends FileRepo { global $wgMemc; if ( !$this->canCacheThumbs() ) { - return $this->getThumbUrl( $name, $width, $height, null, $params ); + $result = null; // can't pass "null" by reference, but it's ok as default value + return $this->getThumbUrl( $name, $width, $height, $result, $params ); } $key = $this->getLocalCacheKey( 'ForeignAPIRepo', 'ThumbUrl', $name ); $sizekey = "$width:$height:$params";