Changeset 21965


Ignore:
Timestamp:
Apr 2, 2013, 6:04:51 AM (8 years ago)
Author:
rvelices
Message:

fix web service optional array parameters were always transformed to arrays

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/ws_core.inc.php

    r20750 r21965  
    413413          $flags |= WS_PARAM_OPTIONAL;
    414414        }
    415         if ( $flags & WS_PARAM_FORCE_ARRAY )
    416         {
    417           $flags |= WS_PARAM_ACCEPT_ARRAY;
    418         }
    419415        $options['flags'] = $flags;
    420416        $params[$param] = $options;
     
    497493        {
    498494          $params[$name] = $options['default'];
    499           if ( ($flags&WS_PARAM_FORCE_ARRAY) )
     495          if ( ($flags&WS_PARAM_FORCE_ARRAY)==WS_PARAM_FORCE_ARRAY )
    500496          {
    501497            $this->makeArrayParam( $params[$name] );
     
    510506          return new PwgError(WS_ERR_INVALID_PARAM, $name.' must be scalar' );
    511507        }
    512         if ( ($flags&WS_PARAM_FORCE_ARRAY) )
     508        if ( ($flags&WS_PARAM_FORCE_ARRAY)==WS_PARAM_FORCE_ARRAY )
    513509        {
    514510          $this->makeArrayParam( $the_param );
Note: See TracChangeset for help on using the changeset viewer.