- Affected version
- 2.0.4
Code:
MySQL query error [1690]: BIGINT UNSIGNED value is out of range in '(`xenforo`.`xf_user`.`alerts_unread` - 1)'
This is caused by this;
Code:
$this->db()->query("
UPDATE xf_user
SET alerts_unread = GREATEST(0, alerts_unread - 1)
WHERE user_id = ?
", $this->alerted_user_id);
Code:
$this->db()->query("
UPDATE xf_user
SET alerts_unread = GREATEST(0, cast(alerts_unread AS SIGNED) - 1)
WHERE user_id = ?
", $this->alerted_user_id);