Merge "objectcache: Always use interim values on WAN cache tombstones"
[lhc/web/wiklou.git] / includes / libs / JavaScriptMinifier.php
index 2990782..141a515 100644 (file)
@@ -565,6 +565,14 @@ class JavaScriptMinifier {
                                $out .= ' ';
                                $lineLength++;
                        }
+                       if (
+                               $type === self::TYPE_LITERAL
+                               && ( $token === 'true' || $token === 'false' )
+                               && ( $state === self::EXPRESSION || $state === self::PROPERTY_EXPRESSION )
+                               && $last !== '.'
+                       ) {
+                               $token = ( $token === 'true' ) ? '!0' : '!1';
+                       }
 
                        $out .= $token;
                        $lineLength += $end - $pos; // += strlen( $token )