|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull Requests
Pull requests:
HistoryAllCommentsChangesGit/SVN commits
[2016-11-20 20:19 UTC] nikic@php.net
[2016-11-20 20:19 UTC] nikic@php.net
-Status: Open
+Status: Closed
[2016-11-30 23:14 UTC] davey@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Nov 02 22:00:01 2025 UTC |
Description: ------------ When I pass an array of headers to __setSoapHeaders, subsequent calls do not overwrite the previous headers. It works correctly when I pass a single object to that method. Test script: --------------- <?php $client = new \SoapClient(null, [ 'trace' => 1, 'exceptions' => true, 'uri' => '', 'location' => '', ]); $client->__setSoapHeaders([new \SoapHeader('ns', 'Header', ['something' => 1])]); $client->__setSoapHeaders([new \SoapHeader('ns', 'Header', ['something' => 2])]); try { $client->__soapCall('SomeMethod', ['a' => 'b']); } catch(\Exception $e) { } var_dump($client->__getLastRequest()); var_dump($client->__getLastRequestHeaders()); Expected result: ---------------- Can't post the whole XML because of spam detection, so just a fragment: ><SOAP-ENV:Header><ns2:Header><item><key>something</key><value>1</value></item></ns2:Header></SOAP-ENV:Header> Actual result: -------------- ><SOAP-ENV:Header><ns2:Header><item><key>something</key><value>2</value></item></ns2:Header></SOAP-ENV:Header>