From 1ba1ef57b94a89af0527000666935c7c45462dec Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Tue, 18 Mar 2008 21:45:18 +0000 Subject: [PATCH] Workaround for runJobs CategoryTree issue: * Don't bloat $this->mStripList on every setHook() call. It adds up in batch processing until we end up with regex errors! --- includes/Parser.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/includes/Parser.php b/includes/Parser.php index 00b8900e2f..8b2eb0f8a8 100644 --- a/includes/Parser.php +++ b/includes/Parser.php @@ -3843,7 +3843,9 @@ class Parser $tag = strtolower( $tag ); $oldVal = isset( $this->mTagHooks[$tag] ) ? $this->mTagHooks[$tag] : null; $this->mTagHooks[$tag] = $callback; - $this->mStripList[] = $tag; + if( !in_array( $tag, $this->mStripList ) ) { + $this->mStripList[] = $tag; + } return $oldVal; } -- 2.20.1