|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2006-06-19 18:00 UTC] jeremiahh at allstardirectories dot com
[2006-06-19 18:03 UTC] tony2001@php.net
[2006-06-27 01:00 UTC] php-bugs at lists dot php dot net
[2006-07-03 18:25 UTC] jeremiahh at allstardirectories dot com
[2006-07-05 09:05 UTC] tony2001@php.net
[2006-07-13 01:00 UTC] php-bugs at lists dot php dot net
[2007-01-29 09:19 UTC] reshma_rajagopal at yahoo dot com
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Dec 04 00:00:02 2025 UTC |
Description: ------------ The undocumented method SoapClient::__setSoapHeaders() incorrectly handles reference counting when a single SoapHeader object is passed. Reproduce code: --------------- function someMethod() { $headers = new SoapHeader(...); $client = new SoapClient(...); $client->__setSoapHeaders($headers); $this->saved_client = $client; } function someOtherMethod() { $client = $this->saved_client; $client->__soapCall(...); } Expected result: ---------------- For the code $obj->someMethod(); $obj->someOtherMethod(); you would expect the call $client->__soapCall() to succeed with the appropriate soap headers. Actual result: -------------- It crashes. If one does a print_r($this->saved_client) in both methods the problem is obvious. The reference count for $headers is not incremented in __setSoapHeaders() and so when someMethod() finished the object is destroyed while the SoapClient object is still referencing it. Then in someOtherMethod() the SoapHeader object is no longer available.