mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-23 22:10:55 +01:00
Fix a f()[0] use in rPd45855e33e0b98d521ea3e44a4c1f718821ec6cc
Summary: See D3291. Test Plan: Ran `phpast.getast` via API. Reviewers: alanh Reviewed By: alanh CC: aran Differential Revision: https://secure.phabricator.com/D3292
This commit is contained in:
parent
f736ca047a
commit
f0be29649d
1 changed files with 5 additions and 2 deletions
|
@ -42,8 +42,11 @@ final class ConduitAPI_phpast_getast_Method extends ConduitAPIMethod {
|
|||
}
|
||||
|
||||
protected function execute(ConduitAPIRequest $request) {
|
||||
return json_decode(
|
||||
xhpast_get_parser_future($request->getValue('code'))->resolvex()[0]);
|
||||
$source = $request->getValue('code');
|
||||
$future = xhpast_get_parser_future($source);
|
||||
list($stdout) = $future->resolvex();
|
||||
|
||||
return json_decode($stdout, true);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue