#43985 [NEW]: soap error: Object of class stdClass could not be converted to string

From: Date: Wed, 30 Jan 2008 18:36:50 +0000
Subject: #43985 [NEW]: soap error: Object of class stdClass could not be converted to string
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-121794@lists.php.net to get a copy of this message
From: c00lways at gmail dot com Operating system: Red Hat 3.4.5-2 / CentOS PHP version: 5.2.5 PHP Bug Type: SOAP related Bug description: soap error: Object of class stdClass could not be converted to string Description: ------------ when i use soap to open a complex wsdl... and then pass in a stdclass object to be send as parameter... came out crash: Catchable fatal error: Object of class stdClass could not be converted to string in ... this crash is not captured by try / catch Reproduce code: --------------- $client = new SoapClient("http://demo.touricoholidays.com/ws/AmendmentServices.asmx?WSDL", Array( "trace" => 1, "exceptions" => 1, "encoding" => "ISO-8859-1" ) ); $tcost = new stdClass(); //adding this below gives similar problem... //$tcost->CostAmendObj = new stdClass(); //$tcost->CostAmendObj->IsOnlyAvailable = "true"; try { //this statement causes the error... echo "Result: " . $client->costamend( $tcost ); } catch ( Exception $e ) { var_dump( $e->getMessage() ); } Expected result: ---------------- soap response xml Actual result: -------------- Catchable fatal error: Object of class stdClass could not be converted to string in ... -- Edit bug report at http://bugs.php.net/?id=43985&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=43985&r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=43985&r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=43985&r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=43985&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=43985&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=43985&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=43985&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=43985&r=needscript Try newer version: http://bugs.php.net/fix.php?id=43985&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=43985&r=support Expected behavior: http://bugs.php.net/fix.php?id=43985&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=43985&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=43985&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=43985&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=43985&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=43985&r=dst IIS Stability: http://bugs.php.net/fix.php?id=43985&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=43985&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=43985&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=43985&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=43985&r=mysqlcfg

« previous php.bugs (#121794) next »