From d248bc47cf00005673d2b78bf4ff03eea1e2215c Mon Sep 17 00:00:00 2001 From: Bob Trahan Date: Mon, 20 Oct 2014 17:39:19 -0700 Subject: [PATCH] Audit - another partial fix to commit re-parsing bug Summary: Ref T6350. We build $sql based on whose subscribed. If no one is subscribed, then we have no query to run. Test Plan: observed one error disappearing from my daemon log. Also, more doing it live. Reviewers: epriestley, chad Reviewed By: chad Subscribers: Korvin, epriestley Maniphest Tasks: T6350 Differential Revision: https://secure.phabricator.com/D10731 --- .../feed/PhabricatorFeedStoryPublisher.php | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/src/applications/feed/PhabricatorFeedStoryPublisher.php b/src/applications/feed/PhabricatorFeedStoryPublisher.php index 883159970e..5c6940fc8b 100644 --- a/src/applications/feed/PhabricatorFeedStoryPublisher.php +++ b/src/applications/feed/PhabricatorFeedStoryPublisher.php @@ -164,12 +164,15 @@ final class PhabricatorFeedStoryPublisher { $mark_read); } - queryfx( - $conn, - 'INSERT INTO %T (primaryObjectPHID, userPHID, chronologicalKey, hasViewed) - VALUES %Q', - $notif->getTableName(), - implode(', ', $sql)); + if ($sql) { + queryfx( + $conn, + 'INSERT INTO %T '. + '(primaryObjectPHID, userPHID, chronologicalKey, hasViewed) '. + 'VALUES %Q', + $notif->getTableName(), + implode(', ', $sql)); + } } private function sendNotification($chrono_key, array $subscribed_phids) {