From: Evan Prodromou Date: Mon, 1 Mar 2010 19:30:28 +0000 (-0500) Subject: Better logging on bad token in subscription X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=30c992004ff44516a1502f5e118b0395300bcbc0;p=quix0rs-gnu-social.git Better logging on bad token in subscription --- diff --git a/classes/Subscription.php b/classes/Subscription.php index 878ab83e63..da695c36e5 100644 --- a/classes/Subscription.php +++ b/classes/Subscription.php @@ -185,10 +185,13 @@ class Subscription extends Memcached_DataObject if ($token->find(true)) { $result = $token->delete(); + if (!$result) { - common_log_db_error($sub, 'DELETE', __FILE__); + common_log_db_error($token, 'DELETE', __FILE__); throw new Exception(_('Couldn\'t delete subscription OMB token.')); } + } else { + common_log(LOG_ERR, "Couldn't find credentials with token {$token->tok}"); } }