summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Gohr <andi@splitbrain.org>2008-01-19 00:41:20 +0100
committerAndreas Gohr <andi@splitbrain.org>2008-01-19 00:41:20 +0100
commit6f9bd982e2e77e466cfc4d6d33a2bd176700a3f1 (patch)
tree15be5ab46bde1180d268ee481db8c9ee39b18bed
parent3d45a99f3a9522953aad5954e35a811dc4986725 (diff)
downloadrpg-6f9bd982e2e77e466cfc4d6d33a2bd176700a3f1.tar.gz
rpg-6f9bd982e2e77e466cfc4d6d33a2bd176700a3f1.tar.bz2
prevent error on buggy syntax plugin FS#1218
darcs-hash:20080118234120-7ad00-01defe99eda2568ef91acc679a35b25e8bdc40ed.gz
-rw-r--r--inc/parser/parser.php2
-rw-r--r--lib/plugins/syntax.php2
2 files changed, 2 insertions, 2 deletions
diff --git a/inc/parser/parser.php b/inc/parser/parser.php
index 89ce4313d..38a59e256 100644
--- a/inc/parser/parser.php
+++ b/inc/parser/parser.php
@@ -156,7 +156,7 @@ class Doku_Parser_Mode {
function postConnect() {}
function accepts($mode) {
- return in_array($mode, $this->allowedModes );
+ return in_array($mode, (array) $this->allowedModes );
}
}
diff --git a/lib/plugins/syntax.php b/lib/plugins/syntax.php
index eb70dd1ff..7ded173cd 100644
--- a/lib/plugins/syntax.php
+++ b/lib/plugins/syntax.php
@@ -134,7 +134,7 @@ class DokuWiki_Syntax_Plugin extends Doku_Parser_Mode {
$this->allowedModes = array_merge($this->allowedModes, $PARSER_MODES[$mt]);
}
- $idx = array_search(substr(get_class($this), 7), $this->allowedModes);
+ $idx = array_search(substr(get_class($this), 7), (array) $this->allowedModes);
if ($idx !== false) {
unset($this->allowedModes[$idx]);
}