mirror of
https://we.phorge.it/source/phorge.git
synced 2025-01-12 07:41:04 +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) {
|
protected function execute(ConduitAPIRequest $request) {
|
||||||
return json_decode(
|
$source = $request->getValue('code');
|
||||||
xhpast_get_parser_future($request->getValue('code'))->resolvex()[0]);
|
$future = xhpast_get_parser_future($source);
|
||||||
|
list($stdout) = $future->resolvex();
|
||||||
|
|
||||||
|
return json_decode($stdout, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue