Merged ImageFunctions.php into GlobalFunctions.php
[lhc/web/wiklou.git] / includes / libs / JavaScriptMinifier.php
index d34473f..baf9338 100644 (file)
@@ -501,10 +501,10 @@ class JavaScriptMinifier {
                                $end += strspn( $s, '0123456789', $end );
                                $decimal = strspn( $s, '.', $end );
                                if ($decimal) {
-                                       if ( $decimal > 1 ) {
-                                               return self::parseError($s, $end, 'The number has several decimal points' );
+                                       if ( $decimal > 2 ) {
+                                               return self::parseError($s, $end, 'The number has too many decimal points' );
                                        }
-                                       $end += strspn( $s, '0123456789', $end ) + 1;
+                                       $end += strspn( $s, '0123456789', $end + 1 ) + $decimal;
                                }
                                $exponent = strspn( $s, 'eE', $end );
                                if( $exponent ) {