From ebbd57771f2ef8bf0362449a4374387ccd00b686 Mon Sep 17 00:00:00 2001 From: tuomaspelkonen Date: Thu, 5 May 2011 17:23:20 -0700 Subject: [PATCH] Missing optional Conduit arguments do not throw errors anymore. Summary: ConduitAPIRequest::getValue call for optional arguments which are not given added a line to the error log file. Test Plan: Tested that Conduit API calls were working from Conduit console. Reviewed By: epriestley Reviewers: jungejason, epriestley Commenters: jungejason CC: epriestley, aran, jungejason Differential Revision: 236 --- src/applications/conduit/protocol/request/ConduitAPIRequest.php | 2 +- src/applications/conduit/protocol/request/__init__.php | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/applications/conduit/protocol/request/ConduitAPIRequest.php b/src/applications/conduit/protocol/request/ConduitAPIRequest.php index 4a8d3874af..1393f35908 100644 --- a/src/applications/conduit/protocol/request/ConduitAPIRequest.php +++ b/src/applications/conduit/protocol/request/ConduitAPIRequest.php @@ -26,7 +26,7 @@ class ConduitAPIRequest { } public function getValue($key) { - return $this->params[$key]; + return idx($this->params, $key); } public function getAllParameters() { diff --git a/src/applications/conduit/protocol/request/__init__.php b/src/applications/conduit/protocol/request/__init__.php index 5aa52afcf9..fa0da2a745 100644 --- a/src/applications/conduit/protocol/request/__init__.php +++ b/src/applications/conduit/protocol/request/__init__.php @@ -6,5 +6,7 @@ +phutil_require_module('phutil', 'utils'); + phutil_require_source('ConduitAPIRequest.php');