From db20c74044cb2159ebd0fd39be1fa98bd3b710ab Mon Sep 17 00:00:00 2001 From: epriestley Date: Fri, 4 May 2012 17:08:42 -0700 Subject: [PATCH] Add a missing (string) cast to repository.query Summary: The method returns a PhutilURI object, which json_encode() encodes as "{}" since all the properties are private. Test Plan: Examined the output of "repository.query" more carefully: "0" : { "name" : "Phabricator", "callsign" : "P", "vcs" : "git", "uri" : "http:\/\/local.aphront.com:8080\/diffusion\/P\/", "remoteURI" : "git:\/\/github.com\/facebook\/phabricator.git", "tracking" : true }, Reviewers: csilvers, btrahan, vrana, jungejason Reviewed By: csilvers CC: aran Differential Revision: https://secure.phabricator.com/D2402 --- .../method/repository/base/ConduitAPI_repository_Method.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/applications/conduit/method/repository/base/ConduitAPI_repository_Method.php b/src/applications/conduit/method/repository/base/ConduitAPI_repository_Method.php index 11d2f6dba4..bfe0e73364 100644 --- a/src/applications/conduit/method/repository/base/ConduitAPI_repository_Method.php +++ b/src/applications/conduit/method/repository/base/ConduitAPI_repository_Method.php @@ -27,7 +27,7 @@ abstract class ConduitAPI_repository_Method extends ConduitAPIMethod { 'callsign' => $repository->getCallsign(), 'vcs' => $repository->getVersionControlSystem(), 'uri' => PhabricatorEnv::getProductionURI($repository->getURI()), - 'remoteURI' => $repository->getPublicRemoteURI(), + 'remoteURI' => (string)$repository->getPublicRemoteURI(), 'tracking' => $repository->getDetail('tracking-enabled'), ); }