From 2b6935351987b211e41dbaad0af1125536eea7c3 Mon Sep 17 00:00:00 2001 From: epriestley Date: Fri, 30 Nov 2012 12:09:37 -0800 Subject: [PATCH] Fix a bug with T1643 Summary: The construct `count(x == 0)` should be `count(x) == 0`. This causes a concrete problem because `count(0)` is 1. Test Plan: eyeballed it~ Reviewers: btrahan, vrana, klimek Reviewed By: klimek CC: aran Maniphest Tasks: T1643 Differential Revision: https://secure.phabricator.com/D4060 --- .../metamta/replyhandler/PhabricatorMailReplyHandler.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/applications/metamta/replyhandler/PhabricatorMailReplyHandler.php b/src/applications/metamta/replyhandler/PhabricatorMailReplyHandler.php index 83c2742020..20d4436073 100644 --- a/src/applications/metamta/replyhandler/PhabricatorMailReplyHandler.php +++ b/src/applications/metamta/replyhandler/PhabricatorMailReplyHandler.php @@ -73,8 +73,8 @@ abstract class PhabricatorMailReplyHandler { * since this code is running and everything. */ private function shouldSendErrorEmail(PhabricatorMetaMTAReceivedMail $mail) { - return count($mail->getToAddresses() == 1) && - count($mail->getCCAddresses() == 0); + return (count($mail->getToAddresses()) == 1) && + (count($mail->getCCAddresses()) == 0); } private function sendErrorEmail($error,