aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrvelices <rv-github@modusoptimus.com>2013-04-02 04:07:28 +0000
committerrvelices <rv-github@modusoptimus.com>2013-04-02 04:07:28 +0000
commit37d8f78f9ef39b7598e3ddbe507bf346388d00c9 (patch)
treecde94c8bc00095b0f26f60e5ef5e607031ba970b
parentb8b697c2dd3efeb72a206e6eaaa6cf46a52722a1 (diff)
merge -r21965 from trunk fix web service optional array parameters were always transformed to arrays
git-svn-id: http://piwigo.org/svn/branches/2.5@21966 68402e56-0260-453c-a942-63ccdbb3a9ee
-rw-r--r--include/ws_core.inc.php8
1 files changed, 2 insertions, 6 deletions
diff --git a/include/ws_core.inc.php b/include/ws_core.inc.php
index 3e1db6647..fdddbdf06 100644
--- a/include/ws_core.inc.php
+++ b/include/ws_core.inc.php
@@ -412,10 +412,6 @@ Request format: ".@$this->_requestFormat." Response format: ".@$this->_responseF
{
$flags |= WS_PARAM_OPTIONAL;
}
- if ( $flags & WS_PARAM_FORCE_ARRAY )
- {
- $flags |= WS_PARAM_ACCEPT_ARRAY;
- }
$options['flags'] = $flags;
$params[$param] = $options;
}
@@ -496,7 +492,7 @@ Request format: ".@$this->_requestFormat." Response format: ".@$this->_responseF
else if ( array_key_exists('default',$options) )
{
$params[$name] = $options['default'];
- if ( ($flags&WS_PARAM_FORCE_ARRAY) )
+ if ( ($flags&WS_PARAM_FORCE_ARRAY)==WS_PARAM_FORCE_ARRAY )
{
$this->makeArrayParam( $params[$name] );
}
@@ -509,7 +505,7 @@ Request format: ".@$this->_requestFormat." Response format: ".@$this->_responseF
{
return new PwgError(WS_ERR_INVALID_PARAM, $name.' must be scalar' );
}
- if ( ($flags&WS_PARAM_FORCE_ARRAY) )
+ if ( ($flags&WS_PARAM_FORCE_ARRAY)==WS_PARAM_FORCE_ARRAY )
{
$this->makeArrayParam( $the_param );
}