From: Andrew Dolgov Date: Thu, 16 May 2013 17:57:39 +0000 (+0400) Subject: db-prefs: better error output for missing prefs, digest: hide DIGEST_ENABLE pref... X-Git-Tag: 1.8~97 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=6a51939ee6d7e566bf26ed2b5b6ed56c80222cae;p=tt-rss.git db-prefs: better error output for missing prefs, digest: hide DIGEST_ENABLE pref missing for unitialized users --- diff --git a/classes/db/prefs.php b/classes/db/prefs.php index 26fb4666..3e92bb89 100644 --- a/classes/db/prefs.php +++ b/classes/db/prefs.php @@ -105,7 +105,7 @@ class Db_Prefs { return $this->convert($value, $type_name); } else { - user_error("Fatal error, unknown preferences key: $pref_name", $die_on_error ? E_USER_ERROR : E_USER_WARNING); + user_error("Fatal error, unknown preferences key: $pref_name (owner: $user_id)", $die_on_error ? E_USER_ERROR : E_USER_WARNING); return null; } } diff --git a/include/digest.php b/include/digest.php index 965fd1a7..4427936e 100644 --- a/include/digest.php +++ b/include/digest.php @@ -26,7 +26,7 @@ while ($line = db_fetch_assoc($result)) { - if (get_pref('DIGEST_ENABLE', $line['id'], false)) { + if (@get_pref('DIGEST_ENABLE', $line['id'], false)) { $preferred_ts = strtotime(get_pref('DIGEST_PREFERRED_TIME', $line['id'], '00:00')); // try to send digests within 2 hours of preferred time