Only pop an array if it really is an array. BUG # 963554
authorJens Frank <jeluf@users.mediawiki.org>
Mon, 31 May 2004 13:02:19 +0000 (13:02 +0000)
committerJens Frank <jeluf@users.mediawiki.org>
Mon, 31 May 2004 13:02:19 +0000 (13:02 +0000)
includes/Parser.php

index 50f0268..2dc092b 100644 (file)
@@ -1573,7 +1573,7 @@ class Parser
                                $text .= "&lt;" . str_replace( ">", "&gt;", $x);
                        }
                        # Close off any remaining tags
-                       while ( $t = array_pop( $tagstack ) ) {
+                       while ( is_array( $tagstack ) && ($t = array_pop( $tagstack )) ) {
                                $text .= "</$t>\n";
                                if ( $t == "table" ) { $tagstack = array_pop( $tablestack ); }
                        }