r85556 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r85555‎ | r85556 | r85557 >
Date:18:27, 6 April 2011
Author:brion
Status:ok
Tags:
Comment:
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.
Modified paths:
  • /trunk/phase3/includes/filerepo/ForeignAPIRepo.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/filerepo/ForeignAPIRepo.php
@@ -231,7 +231,8 @@
232232 global $wgMemc;
233233
234234 if ( !$this->canCacheThumbs() ) {
235 - return $this->getThumbUrl( $name, $width, $height, null, $params );
 235+ $result = null; // can't pass "null" by reference, but it's ok as default value
 236+ return $this->getThumbUrl( $name, $width, $height, $result, $params );
236237 }
237238 $key = $this->getLocalCacheKey( 'ForeignAPIRepo', 'ThumbUrl', $name );
238239 $sizekey = "$width:$height:$params";

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r81558(bug 26548) Make multi-paged documents (PDFs) work with ForeignAPIRepo (aka I...bawolff08:49, 5 February 2011

Status & tagging log