Remove all assert() calls with string parameters
authorTim Starling <tstarling@wikimedia.org>
Mon, 15 Aug 2016 06:02:53 +0000 (16:02 +1000)
committerLegoktm <legoktm.wikipedia@gmail.com>
Mon, 15 Aug 2016 23:11:18 +0000 (23:11 +0000)
These fail when HHVM is in RepoAuthoritative mode

Change-Id: Ifb1628f8269b2b651154b740b95cc14163a1b186

includes/parser/Preprocessor_DOM.php
includes/parser/Preprocessor_Hash.php

index a28c0aa..5da7cd7 100644 (file)
@@ -539,7 +539,7 @@ class Preprocessor_DOM extends Preprocessor {
                        } elseif ( $found == 'line-end' ) {
                                $piece = $stack->top;
                                // A heading must be open, otherwise \n wouldn't have been in the search list
-                               assert( '$piece->open == "\n"' );
+                               assert( $piece->open === "\n" );
                                $part = $piece->getCurrentPart();
                                // Search back through the input to see if it has a proper close.
                                // Do this using the reversed string since the other solutions
index 012288f..8a4637e 100644 (file)
@@ -475,7 +475,7 @@ class Preprocessor_Hash extends Preprocessor {
                        } elseif ( $found == 'line-end' ) {
                                $piece = $stack->top;
                                // A heading must be open, otherwise \n wouldn't have been in the search list
-                               assert( '$piece->open == "\n"' );
+                               assert( $piece->open === "\n" );
                                $part = $piece->getCurrentPart();
                                // Search back through the input to see if it has a proper close.
                                // Do this using the reversed string since the other solutions