aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormarcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544>2009-03-18 14:28:21 +0000
committermarcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544>2009-03-18 14:28:21 +0000
commit544cf81e61ef93ee9e01e3937aab6fe82367b86c (patch)
tree87e0ac4c77f78a16729f394dcae9faaf8a673e5e
parenteba0bbe90e6e2a76ddeefd46d1c314aae64bac3f (diff)
downloadelgg-544cf81e61ef93ee9e01e3937aab6fe82367b86c.tar.gz
elgg-544cf81e61ef93ee9e01e3937aab6fe82367b86c.tar.bz2
Closes #844: API parameter test logic improved
git-svn-id: https://code.elgg.org/elgg/trunk@3166 36083f99-b078-4883-b0ff-0f9b5a30f544
-rw-r--r--engine/lib/api.php4
1 files 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