diff options
| author | Macil Tech <maciltech@gmail.com> | 2013-03-27 22:09:39 +0800 |
|---|---|---|
| committer | Macil Tech <maciltech@gmail.com> | 2013-06-18 11:02:45 -0500 |
| commit | 3bcc87caf294cd67f221854d1dc13065706f5a81 (patch) | |
| tree | 1c20c1ecf696f96e879be76c4dd3cf4c9fdb627c /inc/mod/pages.php | |
| parent | fd33e9eba1e72fd4ee5f064944e9592be66c12c1 (diff) | |
Fix PM count caching.
cache::get() returns null if the key wasn't found (at least when using
the Redis cache backend).
Diffstat (limited to 'inc/mod/pages.php')
| -rw-r--r-- | inc/mod/pages.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/inc/mod/pages.php b/inc/mod/pages.php index cf06e7d9..726ed735 100644 --- a/inc/mod/pages.php +++ b/inc/mod/pages.php @@ -89,7 +89,7 @@ function mod_dashboard() { } } - if (!$config['cache']['enabled'] || ($args['unread_pms'] = cache::get('pm_unreadcount_' . $mod['id'])) === false) { + if (!$config['cache']['enabled'] || ($args['unread_pms'] = cache::get('pm_unreadcount_' . $mod['id'])) == false) { $query = prepare('SELECT COUNT(*) FROM `pms` WHERE `to` = :id AND `unread` = 1'); $query->bindValue(':id', $mod['id']); $query->execute() or error(db_error($query)); |
