From d8d677864ec3e508e69e24d09e3d82b3db5605aa Mon Sep 17 00:00:00 2001 From: Klaus Leithoff Date: Wed, 21 Apr 2010 14:26:06 +0000 Subject: [PATCH] fix for strange behavior of isset for an given array-element, when the tested var is a string; solution: use isset together with is_array --- addressbook/inc/class.addressbook_sql.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addressbook/inc/class.addressbook_sql.inc.php b/addressbook/inc/class.addressbook_sql.inc.php index 72d3dbac94..3f59bf9a39 100644 --- a/addressbook/inc/class.addressbook_sql.inc.php +++ b/addressbook/inc/class.addressbook_sql.inc.php @@ -316,7 +316,7 @@ class addressbook_sql extends so_sql_cf $filter[] = $this->table_name.'.contact_owner='.(int)$filter['owner']; unset($filter['owner']); } - if (is_array($criteria) && array_key_exists('owner',$criteria)) + if (is_array($criteria) && isset($criteria['owner'])) { $criteria[] = $this->table_name.'.contact_owner='.(int)$criteria['owner']; unset($criteria['owner']);