Follow up to r114126: Being more conservative for HipHop compiler
authorChristian Aistleitner <qchris@users.mediawiki.org>
Mon, 19 Mar 2012 23:36:48 +0000 (23:36 +0000)
committerChristian Aistleitner <qchris@users.mediawiki.org>
Mon, 19 Mar 2012 23:36:48 +0000 (23:36 +0000)
includes/parser/Preprocessor_HipHop.hphp

index 0cf2e8a..aedcac2 100644 (file)
@@ -444,7 +444,8 @@ class Preprocessor_HipHop implements Preprocessor {
                        } elseif ( $found === 'line-end' ) {
                                $piece = $stack->getTop();
                                // A heading must be open, otherwise \n wouldn't have been in the search list
-                               assert( '$piece->open === "\n"' );
+                               assert( $piece->open === "\n" ); // Passing the assert condition directly instead of string, as
+                                                                // HPHP /compiler/ chokes on strings when ASSERT_ACTIVE != 0.
                                $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 (end anchor, etc.) are inefficient