]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
better error reporting
authorEvan Prodromou <evan@prodromou.name>
Mon, 7 Jul 2008 07:44:34 +0000 (03:44 -0400)
committerEvan Prodromou <evan@prodromou.name>
Mon, 7 Jul 2008 07:44:34 +0000 (03:44 -0400)
darcs-hash:20080707074434-84dde-ffc9b2caeef3e9fef9607511b425880986883d72.gz

lib/util.php

index 3301c023366563c210504f1c4430bd125372524e..638bd0333f44455ad8f4a68db6e279237a5a07bd 100644 (file)
@@ -852,7 +852,9 @@ function common_save_replies($notice) {
                }
                $id = $reply->insert();
                if (!$id) {
-                       common_log_db_error($reply, 'INSERT', __FILE__);
+                       $last_error = &PEAR::getStaticProperty('DB_DataObject','lastError');
+                       common_log(LOG_ERROR, 'DB error inserting reply: ' . $last_error->message);
+                       common_server_error('DB error inserting reply: ' . $last_error->message);
                        return;
                }
        }