From 544cf81e61ef93ee9e01e3937aab6fe82367b86c Mon Sep 17 00:00:00 2001 From: marcus Date: Wed, 18 Mar 2009 14:28:21 +0000 Subject: Closes #844: API parameter test logic improved git-svn-id: https://code.elgg.org/elgg/trunk@3166 36083f99-b078-4883-b0ff-0f9b5a30f544 --- engine/lib/api.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/engine/lib/api.php b/engine/lib/api.php index c1ade103a..ad1503f63 100644 --- a/engine/lib/api.php +++ b/engine/lib/api.php @@ -479,8 +479,8 @@ // Check that the variable is present in the request if ( - (!isset($parameters[$key])) && // No parameter - ((!isset($value['required'])) || ($value['required']!=true)) // and not optional + (!isset($parameters[$key])) || // No parameter + ((!isset($value['required'])) || ($value['required']==true)) // Or not optional ) throw new APIException(sprintf(elgg_echo('APIException:MissingParameterInMethod'), $key, $method)); else -- cgit v1.2.3