From 173f278305be97fd6d51f90472add11514b5aa29 Mon Sep 17 00:00:00 2001 From: chris Date: Fri, 27 Oct 2006 02:41:17 +0200 Subject: fix bug#956 (also sp. in pluginutils) darcs-hash:20061027004117-9b6ab-b7eda08e246e942a1ca4841b94abeda4c2ed722c.gz --- lib/plugins/syntax.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'lib') diff --git a/lib/plugins/syntax.php b/lib/plugins/syntax.php index 2a4d1e0ff..ccf657720 100644 --- a/lib/plugins/syntax.php +++ b/lib/plugins/syntax.php @@ -133,8 +133,11 @@ class DokuWiki_Syntax_Plugin extends Doku_Parser_Mode { foreach($allowedModeTypes as $mt) { $this->allowedModes = array_merge($this->allowedModes, $PARSER_MODES[$mt]); } - - unset($this->allowedModes[array_search(substr(get_class($this), 7), $this->allowedModes)]); + + $idx = array_search(substr(get_class($this), 7), $this->allowedModes); + if ($idx !== false) { + unset($this->allowedModes[$idx]); + } $this->allowedModesSetup = true; } -- cgit v1.2.3