From: Bryan Tong Minh Date: Sun, 13 Feb 2011 20:38:05 +0000 (+0000) Subject: Follow-up r82049: Fix strict comparison because MediaHandler::parseParamString()... X-Git-Tag: 1.31.0-rc.0~32008 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/banques/ajouter.php?a=commitdiff_plain;h=a65582f4e8b092f17c1e87debdd8a37983cb4bad;p=lhc%2Fweb%2Fwiklou.git Follow-up r82049: Fix strict comparison because MediaHandler::parseParamString() is not guaranteed to use intval() on the width and height parameters. Add __METHOD__ to wfDebug() call. --- diff --git a/includes/api/ApiQueryImageInfo.php b/includes/api/ApiQueryImageInfo.php index 628319265d..d95836e8a8 100644 --- a/includes/api/ApiQueryImageInfo.php +++ b/includes/api/ApiQueryImageInfo.php @@ -242,7 +242,7 @@ class ApiQueryImageInfo extends ApiQueryBase { } if ( isset( $paramList['width'] ) ) { - if ( $paramList['width'] !== $thumbParams['width'] ) { + if ( intval( $paramList['width'] ) != intval( $thumbParams['width'] ) ) { $this->dieUsage( "{$p}urlparam had width of {$paramList['width']} but " . "{$p}urlwidth was {$thumbParams['width']}", "urlparam_urlwidth_mismatch" ); } diff --git a/includes/filerepo/ForeignAPIRepo.php b/includes/filerepo/ForeignAPIRepo.php index f37859cea2..35a0ffd898 100644 --- a/includes/filerepo/ForeignAPIRepo.php +++ b/includes/filerepo/ForeignAPIRepo.php @@ -243,7 +243,8 @@ class ForeignAPIRepo extends FileRepo { $knownThumbUrls = array(); } else { if( isset( $knownThumbUrls[$sizekey] ) ) { - wfDebug("Got thumburl from local cache. {$knownThumbUrls[$sizekey]} \n"); + wfDebug( __METHOD__ . ': Got thumburl from local cache: ' . + "{$knownThumbUrls[$sizekey]} \n"); return $knownThumbUrls[$sizekey]; } /* This size is not yet known */