From: Leo Koppelkamm Date: Wed, 13 Apr 2011 11:24:38 +0000 (+0000) Subject: Followup to r85922: Fix STRICT error, rmv redundant whitespace X-Git-Tag: 1.31.0-rc.0~30877 X-Git-Url: http://git.cyclocoop.org/%24image?a=commitdiff_plain;h=f9b4b296ce27805d4bee73aed3686287c2b24e10;p=lhc%2Fweb%2Fwiklou.git Followup to r85922: Fix STRICT error, rmv redundant whitespace --- diff --git a/includes/parser/Parser.php b/includes/parser/Parser.php index 7045690b15..d07acef213 100644 --- a/includes/parser/Parser.php +++ b/includes/parser/Parser.php @@ -877,7 +877,8 @@ class Parser { if ( empty($last_row) ) { $last_row = NULL; } - $o = $this->printTableHtml( array_pop($tables) ) . $line; + $curtable = array_pop($tables); + $o = $this->printTableHtml( $curtable ) . $line; if ( count($tables) > 0 ) { $table =& $this->last($tables); @@ -905,11 +906,11 @@ class Parser { if( $attributes !== '') { $current_row['attributes'] = $attributes; } - + } else if ( $first_chars === '|+' ) { // a table caption $line = substr ( $line , 2 ); - + $c = $this->getCellAttr($line , 'caption'); $table['caption'] = array(); $table['caption']['content'] = $c[0]; @@ -952,24 +953,25 @@ class Parser { unset($c); } $output =& $current_element['content']; - + } else { $output .= $outLine."\n"; } } - + # Remove trailing line-ending (b/c) if ( substr( $out, -1 ) === "\n" ) { $out = substr( $out, 0, -1 ); } - + #Close any unclosed tables if (isset($tables) && count($tables) > 0 ) { for ($i = 0; $i < count($tables); $i++) { - $out .= $this->printTableHtml( array_pop($tables) ); + $curtable = array_pop($tables); + $out .= $this->printTableHtml( $curtable ); } } - + wfProfileOut( __METHOD__ ); return $out; @@ -1033,7 +1035,7 @@ class Parser { $last_section = ''; $empty = true; $simple = true; - + //If we only have tbodies, mark table as simple for($i = 0; isset($t[$i]); $i++ ) { if ( !count( $t[$i]) ) continue; @@ -3531,7 +3533,7 @@ class Parser { # Update fetched file title $title = $file->getTitle(); } - return array( $file, $title ); + return array( $file, $title ); } /**