diff options
author | Marc Alexander <admin@m-a-styles.de> | 2014-11-13 22:39:11 +0100 |
---|---|---|
committer | Marc Alexander <admin@m-a-styles.de> | 2014-11-14 11:08:35 +0100 |
commit | 556565d072c7e7d94ac4282baf2ff0bb2c2bdb8c (patch) | |
tree | cb450b2ecd0608ad41e37df891b6f769575992f6 | |
parent | c9db08873f1e1d9f9f89da181d5aa374464fc250 (diff) | |
download | forums-556565d072c7e7d94ac4282baf2ff0bb2c2bdb8c.tar forums-556565d072c7e7d94ac4282baf2ff0bb2c2bdb8c.tar.gz forums-556565d072c7e7d94ac4282baf2ff0bb2c2bdb8c.tar.bz2 forums-556565d072c7e7d94ac4282baf2ff0bb2c2bdb8c.tar.xz forums-556565d072c7e7d94ac4282baf2ff0bb2c2bdb8c.zip |
[ticket/13337] Allow empty array passed to sql_in_set()
is_array() will evaluate to true even if the array is just an empty array.
Make sure we also expect an empty array passed to sql_in_set().
PHPBB3-13337
-rw-r--r-- | phpBB/phpbb/notification/manager.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/phpBB/phpbb/notification/manager.php b/phpBB/phpbb/notification/manager.php index 971a53a16a..dd611e1dd1 100644 --- a/phpBB/phpbb/notification/manager.php +++ b/phpBB/phpbb/notification/manager.php @@ -292,7 +292,7 @@ class manager WHERE notification_time <= " . (int) $time . (($notification_type_name !== false) ? ' AND ' . (is_array($notification_type_name) ? $this->db->sql_in_set('notification_type_id', $this->get_notification_type_ids($notification_type_name)) : 'notification_type_id = ' . $this->get_notification_type_id($notification_type_name)) : '') . - (($item_parent_id !== false) ? ' AND ' . (is_array($item_parent_id) ? $this->db->sql_in_set('item_parent_id', $item_parent_id) : 'item_parent_id = ' . (int) $item_parent_id) : '') . + (($item_parent_id !== false) ? ' AND ' . (is_array($item_parent_id) ? $this->db->sql_in_set('item_parent_id', $item_parent_id, false, true) : 'item_parent_id = ' . (int) $item_parent_id) : '') . (($user_id !== false) ? ' AND ' . (is_array($user_id) ? $this->db->sql_in_set('user_id', $user_id) : 'user_id = ' . (int) $user_id) : ''); $this->db->sql_query($sql); } |