Commit 7adc6027 authored by Brion Vibber's avatar Brion Vibber

Fix fatal error in FacebookremoveAction if we end up getting called double and...

Fix fatal error in FacebookremoveAction if we end up getting called double and the foreign_link entry has already been removed.
parent e23ad739
......@@ -48,6 +48,12 @@ class FacebookremoveAction extends FacebookAction
$flink = Foreign_link::getByForeignID($this->arg('fb_sig_user'), 2);
if (!$flink) {
common_log(LOG_ERR, "Tried to delete missing foreign_link entry with Facebook ID " . $this->arg('fb_sig_user'));
$this->serverError(_m('Couldn\'t remove Facebook user: already deleted.'));
return;
}
common_debug("Removing foreign link to Facebook - local user ID: $flink->user_id, Facebook ID: $flink->foreign_id");
$result = $flink->delete();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment