mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-20 04:20:55 +01:00
IRC Macro Handler - check result from conduit call before operating on it
Summary: 'cuz github issue 114 came into existence. instead, just return false early here. note i am not sure if I should phlog that this is happening or not but its not exception worthy IMO. Test Plan: lint-only 'cuz i don't want to setup an IRC server locally / somehow get my local phabricator instance accessible out there. happy to test end to end if there's an easier way...! Reviewers: vrana, epriestley Reviewed By: vrana CC: aran, Koolvin Differential Revision: https://secure.phabricator.com/D2490
This commit is contained in:
parent
60696de095
commit
5475a1bec7
1 changed files with 4 additions and 1 deletions
|
@ -39,7 +39,10 @@ final class PhabricatorIRCMacroHandler extends PhabricatorIRCHandler {
|
|||
$macros = $this->getConduit()->callMethodSynchronous(
|
||||
'macro.query',
|
||||
array());
|
||||
|
||||
// gotta bail if we failed to fetch the macros
|
||||
if ($macros === null) {
|
||||
return false;
|
||||
}
|
||||
$this->macros = $macros;
|
||||
|
||||
$regexp = array();
|
||||
|
|
Loading…
Reference in a new issue