1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-20 20:40:56 +01:00

Fix D2490 (make macro handler correctly bail if there are no macros)

Summary: D2490 was not my finest hour and I incorrectly thought it was a null value from error. In reality this error is impossible and its just a valid empty array so instead use the empty predicate to bail.

Test Plan: with our logic combined, this be tested

Reviewers: vrana, epriestley

Reviewed By: epriestley

CC: aran, Koolvin

Differential Revision: https://secure.phabricator.com/D2503
This commit is contained in:
Bob Trahan 2012-05-19 16:19:33 -07:00
parent 912e414013
commit 7c42ade617

View file

@ -39,8 +39,8 @@ final class PhabricatorIRCMacroHandler extends PhabricatorIRCHandler {
$macros = $this->getConduit()->callMethodSynchronous(
'macro.query',
array());
// gotta bail if we failed to fetch the macros
if ($macros === null) {
// bail if we have no macros
if (empty($macros)) {
return false;
}
$this->macros = $macros;