dépôts
/
lhc
/
web
/
wiklou.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
691915f
)
Measure string length once in Parser::replaceVariables
author
Ori Livneh
<ori@wikimedia.org>
Wed, 9 Sep 2015 01:48:33 +0000
(18:48 -0700)
committer
Ori.livneh
<ori@wikimedia.org>
Wed, 9 Sep 2015 23:52:32 +0000
(23:52 +0000)
Change-Id: I5b1e3f3fa06cb4e2982f3c0d24222ba2ee59ea47
includes/parser/Parser.php
patch
|
blob
|
history
diff --git
a/includes/parser/Parser.php
b/includes/parser/Parser.php
index
664f0a4
..
ab5c586
100644
(file)
--- a/
includes/parser/Parser.php
+++ b/
includes/parser/Parser.php
@@
-3326,7
+3326,8
@@
class Parser {
*/
public function replaceVariables( $text, $frame = false, $argsOnly = false ) {
# Is there any text? Also, Prevent too big inclusions!
- if ( strlen( $text ) < 1 || strlen( $text ) > $this->mOptions->getMaxIncludeSize() ) {
+ $textSize = strlen( $text );
+ if ( $textSize < 1 || $textSize > $this->mOptions->getMaxIncludeSize() ) {
return $text;
}