From: php dot maks3w at virtualplanets dot net Operating system: PHP version: 5.4.9 Package: SOAP related Bug Type: Bug Bug description:Segmentation fault when try to get $request
Description: ------------ Situation: Custom class which extend from SoapClient and override "public function __doRequest($request, $location, $action, $version, $one_way = null)" $request can't be used to compare strings, instead throw a Segmentation Fault error. $request looks like a C Pointer or any other type instead of a PHP String type As workaround you can filter the variable passing the value through a function which return basically the same value of the argument passed as input (like ltrim) after that it's possible save the returned value and now is a normal PHP String and can be compared. Test script: --------------- FAILING CODE: public $lastRequest; function __doRequest($request, $location, $action, $version, $one_way = 0) { $this->lastRequest = $request; } $this->assertEquals('SomeContent', $this->lastRequest); // Segmentation Faul. WORKAROUND: public $lastRequest; function __doRequest($request, $location, $action, $version, $one_way = 0) { $this->lastRequest = ltrim($request); // Pass $request through a function } $this->assertEquals('SomeContent', $this->lastRequest); // Works -- Edit bug report at https://bugs.php.net/bug.php?id=63780&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=63780&r=trysnapshot54 Try a snapshot (PHP 5.3): https://bugs.php.net/fix.php?id=63780&r=trysnapshot53 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=63780&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=63780&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=63780&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=63780&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=63780&r=needscript Try newer version: https://bugs.php.net/fix.php?id=63780&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=63780&r=support Expected behavior: https://bugs.php.net/fix.php?id=63780&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=63780&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=63780&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=63780&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=63780&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=63780&r=dst IIS Stability: https://bugs.php.net/fix.php?id=63780&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=63780&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=63780&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=63780&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=63780&r=mysqlcfg