From 5efac64eff54c4470a5f783a288854fe4e89a669 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Tue, 26 Oct 2010 13:29:09 +0000 Subject: [PATCH] fixed wrong parameter type warning --- etemplate/inc/class.nextmatch_widget.inc.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/etemplate/inc/class.nextmatch_widget.inc.php b/etemplate/inc/class.nextmatch_widget.inc.php index c308d17a11..3618ffce14 100644 --- a/etemplate/inc/class.nextmatch_widget.inc.php +++ b/etemplate/inc/class.nextmatch_widget.inc.php @@ -486,11 +486,11 @@ class nextmatch_widget /** * Calling our callback - * + * * Signature of get_rows callback is either: * a) int get_rows($query,&$rows,&$readonlys) * b) int get_rows(&$query,&$rows,&$readonlys) - * + * * If get_rows is called static (and php >= 5.2.3), it is always b) independent on how it's defined! * * @param array &$value @@ -586,7 +586,7 @@ class nextmatch_widget if ($this->selectcols) { - foreach(explode(',',$this->selectcols) as $col) + foreach(is_array($this->selectcols) ? $this->selectcols : explode(',',$this->selectcols) as $col) { if ($col[0] == self::CF_PREFIX) $allowed[] = $col; } @@ -975,8 +975,8 @@ class nextmatch_widget if($value_in[self::CF_PREFIX.$name]['id'] != '' && $value_in[self::CF_PREFIX.$name]['id'] != $old_id) { $nm_global['filter'][self::CF_PREFIX.$name] = $value_in[self::CF_PREFIX.$name]['id']; } - - } + + } elseif ((string)$value_in[self::CF_PREFIX.$name] != (string)$extension_data['old_value'][self::CF_PREFIX.$name]) { $nm_global['filter'][self::CF_PREFIX.$name] = $value_in[self::CF_PREFIX.$name]['id'];