From dc1f7fd88cfee7faa8336e6684ebf5b7f7c6c1a7 Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Wed, 6 Apr 2011 18:27:20 +0000 Subject: [PATCH] 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. --- includes/filerepo/ForeignAPIRepo.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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"; -- 2.20.1