From: Aaron Schulz Date: Mon, 2 Mar 2009 02:06:01 +0000 (+0000) Subject: short-circuit replaceVariables() for all the empty text that seems to come in X-Git-Tag: 1.31.0-rc.0~42641 X-Git-Url: http://git.cyclocoop.org/%24href?a=commitdiff_plain;h=d476aa631522cb8c595d8d4e47b8691440220d2d;p=lhc%2Fweb%2Fwiklou.git short-circuit replaceVariables() for all the empty text that seems to come in --- diff --git a/includes/parser/Parser.php b/includes/parser/Parser.php index e0fbb155f7..bff34985f1 100644 --- a/includes/parser/Parser.php +++ b/includes/parser/Parser.php @@ -2608,11 +2608,10 @@ class Parser * @private */ function replaceVariables( $text, $frame = false, $argsOnly = false ) { - # Prevent too big inclusions - if( strlen( $text ) > $this->mOptions->getMaxIncludeSize() ) { + # Is there any text? Also, Prevent too big inclusions! + if ( strlen( $text ) < 1 || strlen( $text ) > $this->mOptions->getMaxIncludeSize() ) { return $text; } - wfProfileIn( __METHOD__ ); if ( $frame === false ) {