From 7b9e098668f617bbfc998fdaaf0f825e2c07eb6a Mon Sep 17 00:00:00 2001 From: Platonides Date: Tue, 22 Nov 2011 17:48:32 +0000 Subject: [PATCH] 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. --- includes/libs/JavaScriptMinifier.php | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) 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 ) { -- 2.20.1