From 48ce511f947e966b624dc3cf6e6b884361c3370d Mon Sep 17 00:00:00 2001 From: Evan Prodromou Date: Mon, 1 Mar 2010 14:30:28 -0500 Subject: [PATCH] Better logging on bad token in subscription --- classes/Subscription.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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}"); } } -- 2.39.5