From f0be29649da5954157155ba391c2d7e00d72e8ed Mon Sep 17 00:00:00 2001 From: epriestley Date: Wed, 15 Aug 2012 04:36:41 -0700 Subject: [PATCH] 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 --- .../method/phpast/ConduitAPI_phpast_getast_Method.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/applications/conduit/method/phpast/ConduitAPI_phpast_getast_Method.php b/src/applications/conduit/method/phpast/ConduitAPI_phpast_getast_Method.php index fe0dacf4d1..abaa6385e5 100644 --- a/src/applications/conduit/method/phpast/ConduitAPI_phpast_getast_Method.php +++ b/src/applications/conduit/method/phpast/ConduitAPI_phpast_getast_Method.php @@ -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); } }