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) {