From d476aa631522cb8c595d8d4e47b8691440220d2d Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Mon, 2 Mar 2009 02:06:01 +0000 Subject: [PATCH] short-circuit replaceVariables() for all the empty text that seems to come in --- includes/parser/Parser.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) 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 ) { -- 2.20.1