summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Sulfrian <alex@spline.inf.fu-berlin.de>2013-09-01 10:00:00 +0000
committerAlexander Sulfrian <alex@spline.inf.fu-berlin.de>2013-09-01 10:00:00 +0000
commit96f4d7a855a751b14a36bb0c0e78c88db033d169 (patch)
tree63eae3cd5c03a914b35c260820ad5d11a3f21642
parentbeb6a8fdfe13b4e884156a538b006af5b89842e1 (diff)
downloaddokuwiki-96f4d7a855a751b14a36bb0c0e78c88db033d169.tar.gz
dokuwiki-96f4d7a855a751b14a36bb0c0e78c88db033d169.tar.bz2
dokuwiki-96f4d7a855a751b14a36bb0c0e78c88db033d169.zip
key_not_exists: handle empty array
-rw-r--r--plugins/modifier.key_not_exists.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/plugins/modifier.key_not_exists.php b/plugins/modifier.key_not_exists.php
index f6906cd..f29e077 100644
--- a/plugins/modifier.key_not_exists.php
+++ b/plugins/modifier.key_not_exists.php
@@ -2,6 +2,10 @@
function smarty_modifier_key_not_exists($value, $key)
{
+ if (!is_array($value)) {
+ return array();
+ }
+
return array_filter($value,
function($v) use ($key) {
return !array_key_exists($key, $v);