mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-20 12:30: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:
parent
912e414013
commit
7c42ade617
1 changed files with 2 additions and 2 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue