mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-21 10:48:59 +00:00
[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
This commit is contained in:
parent
c9db08873f
commit
556565d072
1 changed files with 1 additions and 1 deletions
|
@ -292,7 +292,7 @@ class manager
|
||||||
WHERE notification_time <= " . (int) $time .
|
WHERE notification_time <= " . (int) $time .
|
||||||
(($notification_type_name !== false) ? ' AND ' .
|
(($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)) : '') .
|
(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) : '');
|
(($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);
|
$this->db->sql_query($sql);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue