From: Brion Vibber Date: Tue, 18 Mar 2008 21:45:18 +0000 (+0000) Subject: Workaround for runJobs CategoryTree issue: X-Git-Tag: 1.31.0-rc.0~49010 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/membres/fiche.php?a=commitdiff_plain;h=1ba1ef57b94a89af0527000666935c7c45462dec;p=lhc%2Fweb%2Fwiklou.git 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! --- 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; }