.php</b> on line <b>130</b>: <b>Undefined variable: notify_users</b><br />
Code: Select all
$sql = 'SELECT n.*
FROM ' . $this->notifications_table . ' n, ' . $this->notification_types_table . ' nt
WHERE n.notification_type_id = ' . (int) $this->notification_type_id . '
AND n.item_parent_id = ' . (int) self::get_item_parent_id($data) . '
AND n.notification_read = 0
AND nt.notification_type_id = n.notification_type_id
AND nt.notification_type_enabled = 1';
$result = $this->db->sql_query($sql);
while ($row = $this->db->sql_fetchrow($result))
{ print_r($row); echo '<hr>';
// Do not create a new notification
unset($notify_users[$row['user_id']]);
print_r($row);
$notification = $this->notification_manager->get_item_type_class($this->get_type(), $row);
$update_responders = $notification->add_responders($data);
exit();
if (!empty($update_responders))
{
$sql = 'UPDATE ' . $this->notifications_table . '
SET ' . $this->db->sql_build_array('UPDATE', $update_responders) . '
WHERE notification_id = ' . $row['notification_id'];
$this->db->sql_query($sql);
}
}
$this->db->sql_freeresult($result);
มันขึ้นตอน
unset($notify_users[$row['user_id']]);
Array
(
[notification_id] => 94
[notification_type_id] => 23
[item_id] => 141
[item_parent_id] => 141
[user_id] => 49
[notification_read] => 0
[notification_time] => 1443777832
[notification_data] => a:4:{s:12:"requester_id";i:48;s:7:"post_id";i:141;s:8:"topic_id";i:35;s:12
:"post_subject";s:19:"Re: ทดสอบ";}
)
<hr><b>[phpBB Debug] PHP Notice</b>: in file <b>[ROOT]/ext/mindphp/m_button_like/notification/button_like
.php</b> on line <b>130</b>: <b>Undefined variable: notify_users</b><br />
Array
(
[notification_id] => 94
[notification_type_id] => 23
[item_id] => 141
[item_parent_id] => 141
[user_id] => 49
[notification_read] => 0
[notification_time] => 1443777832
[notification_data] => a:4:{s:12:"requester_id";i:48;s:7:"post_id";i:141;s:8:"topic_id";i:35;s:12
:"post_subject";s:19:"Re: ทดสอบ";}
)