bug71711.phpt 1.0 KB

12345678910111213141516171819202122
  1. --TEST--
  2. Bug #71711: Soap Server Member variables reference bug
  3. --EXTENSIONS--
  4. soap
  5. --FILE--
  6. <?php
  7. $client = new class(null, [ 'location' => '', 'uri' => 'http://example.org']) extends SoapClient {
  8. public function __doRequest($request, $location, $action, $version, $one_way = 0): ?string {
  9. echo $request;
  10. return '';
  11. }
  12. };
  13. $ref = array("foo");
  14. $data = new stdClass;
  15. $data->prop =& $ref;
  16. $client->foo($data);
  17. ?>
  18. --EXPECT--
  19. <?xml version="1.0" encoding="UTF-8"?>
  20. <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://example.org" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:foo><param0 xsi:type="SOAP-ENC:Struct"><prop SOAP-ENC:arrayType="xsd:string[1]" xsi:type="SOAP-ENC:Array"><item xsi:type="xsd:string">foo</item></prop></param0></ns1:foo></SOAP-ENV:Body></SOAP-ENV:Envelope>