#34178 [Opn->Fbk]: SOAP Server does not honor a method default parameter value.

From: Date: Wed, 17 Aug 2005 19:47:33 +0000
Subject: #34178 [Opn->Fbk]: SOAP Server does not honor a method default parameter value.
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-83731@lists.php.net to get a copy of this message
ID: 34178 Updated by: tony2001@php.net Reported By: php at virtualmonet dot com -Status: Open +Status: Feedback Bug Type: SOAP related Operating System: redhat PHP Version: 5.1.0b3 New Comment: Thank you for this bug report. To properly diagnose the problem, we need a short but complete example script to be able to reproduce this bug ourselves. A proper reproducing script starts with <?php and ends with ?>, is max. 10-20 lines long and does not require any external resources such as databases, etc. If possible, make the script source available online and provide an URL to it here. Try to avoid embedding huge scripts into the report. Previous Comments: ------------------------------------------------------------------------ [2005-08-17 21:46:49] php at virtualmonet dot com 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 this bug report at http://bugs.php.net/?id=34178&edit=1

« previous php.bugs (#83731) next »