bug79741.phpt 471 B

12345678910111213141516171819202122
  1. --TEST--
  2. Bug #79741: curl_setopt CURLOPT_POSTFIELDS asserts on object with declared properties
  3. --EXTENSIONS--
  4. curl
  5. --FILE--
  6. <?php
  7. class Test {
  8. public $prop = "value";
  9. }
  10. $ch = curl_init();
  11. curl_setopt($ch, CURLOPT_POSTFIELDS, new Test);
  12. ?>
  13. ===DONE===
  14. --EXPECTF--
  15. Fatal error: Uncaught Error: Object of class Test could not be converted to string in %s:%d
  16. Stack trace:
  17. #0 %s(%d): curl_setopt(Object(CurlHandle), %d, Object(Test))
  18. #1 {main}
  19. thrown in %s on line %d