]> khamidou — GitHub mirrors - arcanist.git/commitdiff
Pass the file contents instead of the file path to `phutil_json_decode`.
authorJoshua Spence <josh@joshuaspence.com>
Tue, 24 Jun 2014 01:40:04 +0000 (11:40 +1000)
committerJoshua Spence <josh@joshuaspence.com>
Tue, 24 Jun 2014 02:02:19 +0000 (12:02 +1000)
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

index 700b6d6cf23a2bda2673bf5650ac23c48dca1a3c..289f11a418b553eefc8deb6f4fb1e58a586ff72c 100644 (file)
@@ -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),