bug77141.phpt 1.0 KB

1234567891011121314151617181920212223242526272829
  1. --TEST--
  2. Bug #77141 (Signedness issue in SOAP when precision=-1)
  3. --EXTENSIONS--
  4. soap
  5. --FILE--
  6. <?php
  7. class MySoapClient extends SoapClient {
  8. public function __doRequest($request, $location, $action, $version, $one_way = 0): string {
  9. echo $request, "\n";
  10. return '';
  11. }
  12. }
  13. $soap = new MySoapClient(
  14. null,
  15. array(
  16. 'location' => "http://localhost/soap.php",
  17. 'uri' => "http://localhost/",
  18. 'style' => SOAP_RPC,
  19. 'trace' => true,
  20. 'exceptions' => false,
  21. )
  22. );
  23. ini_set('precision', -1);
  24. $soap->call(1.1);
  25. ?>
  26. --EXPECT--
  27. <?xml version="1.0" encoding="UTF-8"?>
  28. <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://localhost/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:call><param0 xsi:type="xsd:float">1.1</param0></ns1:call></SOAP-ENV:Body></SOAP-ENV:Envelope>