From e85e47b509218117e8c454d698a5f7de2ff07812 Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Fri, 27 Nov 2009 14:20:57 -0800 Subject: [PATCH] Log database errors when saving notice_inbox entries --- classes/Notice.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/classes/Notice.php b/classes/Notice.php index ebb5022b99..3126cc0647 100644 --- a/classes/Notice.php +++ b/classes/Notice.php @@ -964,7 +964,10 @@ class Notice extends Memcached_DataObject } if ($cnt >= MAX_BOXCARS) { $inbox = new Notice_inbox(); - $inbox->query($qry); + $result = $inbox->query($qry); + if (PEAR::isError($result)) { + common_log_db_error($inbox, $qry); + } $qry = $qryhdr; $cnt = 0; } @@ -972,7 +975,10 @@ class Notice extends Memcached_DataObject if ($cnt > 0) { $inbox = new Notice_inbox(); - $inbox->query($qry); + $result = $inbox->query($qry); + if (PEAR::isError($result)) { + common_log_db_error($inbox, $qry); + } } return; -- 2.39.5