From: php at virtualmonet dot com
Operating system: redhat
PHP version: 5.1.0b3
PHP Bug Type: SOAP related
Bug description: SOAP Server does not honor a method default parameter value.
Description:
------------
It seems PHP soap server does not set the default parameter values of the
called method.
#===================================================
Line 1 should return "sayhello to x"
but instead returns "sayhello to"
Reproduce code:
---------------
#--------------------------------------------------
# on the server side
class Test1 {
/**
*
* @param string $me
* @return string
*/
function sayHello($me='x'){
$s = "sayhello to $me";
return $s;
}
}
#--------------------------------------------------
# on the client side
$o=new SoapClient($url);
echo $o->sayhello() . "<br>";
Expected result:
----------------
sayhello to x
Actual result:
--------------
sayhello to
--
Edit bug report at http://bugs.php.net/?id=34178&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=34178&r=trysnapshot4
Try a CVS snapshot (php5.0):
http://bugs.php.net/fix.php?id=34178&r=trysnapshot50
Try a CVS snapshot (php5.1):
http://bugs.php.net/fix.php?id=34178&r=trysnapshot51
Fixed in CVS: http://bugs.php.net/fix.php?id=34178&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=34178&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=34178&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=34178&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=34178&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=34178&r=support
Expected behavior: http://bugs.php.net/fix.php?id=34178&r=notwrong
Not enough info:
http://bugs.php.net/fix.php?id=34178&r=notenoughinfo
Submitted twice:
http://bugs.php.net/fix.php?id=34178&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=34178&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=34178&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=34178&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=34178&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=34178&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=34178&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=34178&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=34178&r=mysqlcfg