From: Kevin Israel Date: Tue, 19 Feb 2013 09:31:33 +0000 (-0500) Subject: Always cast input to string in wfBaseConvert X-Git-Tag: 1.31.0-rc.0~20648^2 X-Git-Url: http://git.cyclocoop.org/%22.%24info%5B?a=commitdiff_plain;h=1d41a94cff8f34ac6b25baaff06aeb8f3792b507;p=lhc%2Fweb%2Fwiklou.git Always cast input to string in wfBaseConvert Fixes a regression caused by I841717be: IP::toHex('128.0.0.0') was broken on 32-bit systems with the GMP extension installed. Change-Id: I0c9a4ae771668e005355e381de4065d73c261460 --- diff --git a/includes/GlobalFunctions.php b/includes/GlobalFunctions.php index 3fa816fc80..0e5fddc64a 100644 --- a/includes/GlobalFunctions.php +++ b/includes/GlobalFunctions.php @@ -3206,6 +3206,7 @@ function wfDoUpdates( $commit = '' ) { * @return string|bool The output number as a string, or false on error */ function wfBaseConvert( $input, $sourceBase, $destBase, $pad = 1, $lowercase = true, $engine = 'auto' ) { + $input = (string)$input; if( $sourceBase < 2 || $sourceBase > 36 ||