mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-20 05:13:54 -07:00
Fixed empty $row['pm_count'] (#880)
This commit is contained in:
parent
d6cec9333c
commit
bebf6dd4a4
1 changed files with 2 additions and 2 deletions
|
@ -78,7 +78,7 @@ if ($logged_in && empty($gen_simple_header) && !defined('IN_ADMIN')) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!$have_new_pm && $userdata['user_unread_privmsg']) {
|
if (!$have_new_pm && $userdata['user_unread_privmsg']) {
|
||||||
// synch unread pm count
|
// sync unread pm count
|
||||||
if (defined('IN_PM')) {
|
if (defined('IN_PM')) {
|
||||||
$row = DB()->fetch_row("
|
$row = DB()->fetch_row("
|
||||||
SELECT COUNT(*) AS pm_count
|
SELECT COUNT(*) AS pm_count
|
||||||
|
@ -88,7 +88,7 @@ if ($logged_in && empty($gen_simple_header) && !defined('IN_ADMIN')) {
|
||||||
GROUP BY privmsgs_to_userid
|
GROUP BY privmsgs_to_userid
|
||||||
");
|
");
|
||||||
|
|
||||||
$real_unread_pm_count = (int)$row['pm_count'];
|
$real_unread_pm_count = (int)$row['pm_count'] ?? 0;
|
||||||
|
|
||||||
if ($userdata['user_unread_privmsg'] != $real_unread_pm_count) {
|
if ($userdata['user_unread_privmsg'] != $real_unread_pm_count) {
|
||||||
$userdata['user_unread_privmsg'] = $real_unread_pm_count;
|
$userdata['user_unread_privmsg'] = $real_unread_pm_count;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue