1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-22 14:52:41 +01:00

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
This commit is contained in:
epriestley 2012-11-30 12:09:37 -08:00
parent b37b725f4f
commit 2b69353519

View file

@ -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,