bug77088.phpt 1016 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. --TEST--
  2. Bug #77088 (Segfault when using SoapClient with null options)
  3. --EXTENSIONS--
  4. soap
  5. --FILE--
  6. <?php
  7. try
  8. {
  9. $options = NULL;
  10. $sClient = new SoapClient("test.wsdl", $options);
  11. }
  12. catch(TypeError $e)
  13. {
  14. var_dump($e);
  15. }
  16. ?>
  17. --EXPECTF--
  18. object(TypeError)#%d (%d) {
  19. ["message":protected]=>
  20. string(%d) "SoapClient::__construct(): Argument #2 ($options) must be of type array, null given"
  21. ["string":"Error":private]=>
  22. string(0) ""
  23. ["code":protected]=>
  24. int(0)
  25. ["file":protected]=>
  26. string(%d) "%sbug77088.php"
  27. ["line":protected]=>
  28. int(6)
  29. ["trace":"Error":private]=>
  30. array(1) {
  31. [0]=>
  32. array(6) {
  33. ["file"]=>
  34. string(%d) "%sbug77088.php"
  35. ["line"]=>
  36. int(6)
  37. ["function"]=>
  38. string(11) "__construct"
  39. ["class"]=>
  40. string(10) "SoapClient"
  41. ["type"]=>
  42. string(2) "->"
  43. ["args"]=>
  44. array(2) {
  45. [0]=>
  46. string(9) "test.wsdl"
  47. [1]=>
  48. NULL
  49. }
  50. }
  51. }
  52. ["previous":"Error":private]=>
  53. NULL
  54. }