From: Platonides Date: Tue, 22 Nov 2011 17:48:32 +0000 (+0000) Subject: Follow-up r103915. The @fixme of r103865 was wrong. X-Git-Tag: 1.31.0-rc.0~26352 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/pie.php?a=commitdiff_plain;h=7b9e098668f617bbfc998fdaaf0f825e2c07eb6a;p=lhc%2Fweb%2Fwiklou.git Follow-up r103915. The @fixme of r103865 was wrong. It is apparently legal to have a decimal point without after it, eg. var a = 5. Not for hexadecimal numbers. --- diff --git a/includes/libs/JavaScriptMinifier.php b/includes/libs/JavaScriptMinifier.php index 78c803085a..94e89d3166 100644 --- a/includes/libs/JavaScriptMinifier.php +++ b/includes/libs/JavaScriptMinifier.php @@ -504,11 +504,7 @@ class JavaScriptMinifier { if ( $decimal > 1 ) { return self::parseError($s, $end, 'The number has several decimal points' ); } - $len = strspn( $s, '0123456789', $end ); - if ( !$len ) { - return self::parseError($s, $pos, 'No numbers after decimal point' ); - } - $end += $len + 1; + $end += strspn( $s, '0123456789', $end ) + 1; } $exponent = strspn( $s, 'eE', $end ); if( $exponent ) {