From 108a4dc9e6ca9de9b6faab9ba5cd0168324be0be Mon Sep 17 00:00:00 2001 From: Joshua Spence Date: Tue, 24 Jun 2014 11:40:04 +1000 Subject: [PATCH] Pass the file contents instead of the file path to `phutil_json_decode`. Summary: See D9681#22. Test Plan: Created an empty `.git/arc/config` file... no exception was thrown. Reviewers: epriestley, #blessed_reviewers Reviewed By: epriestley, #blessed_reviewers Subscribers: epriestley, Korvin Differential Revision: https://secure.phabricator.com/D9704 --- src/workingcopyidentity/ArcanistWorkingCopyIdentity.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/workingcopyidentity/ArcanistWorkingCopyIdentity.php b/src/workingcopyidentity/ArcanistWorkingCopyIdentity.php index 700b6d6c..289f11a4 100644 --- a/src/workingcopyidentity/ArcanistWorkingCopyIdentity.php +++ b/src/workingcopyidentity/ArcanistWorkingCopyIdentity.php @@ -311,7 +311,8 @@ final class ArcanistWorkingCopyIdentity { $local_path)); try { - return phutil_json_decode($local_path); + $json = Filesystem::readFile($local_path); + return phutil_json_decode($json); } catch (PhutilJSONParserException $ex) { throw new PhutilProxyException( pht("Failed to parse '%s' as JSON.", $local_path),