summaryrefslogtreecommitdiff
path: root/ext/curl/tests/bug79741.phpt
blob: 5fddd30c2769cb3ed6465e8f706e5c7b21924fec (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
--TEST--
Bug #79741: curl_setopt CURLOPT_POSTFIELDS asserts on object with declared properties
--FILE--
<?php

class Test {
    public $prop = "value";
}

$ch = curl_init();
curl_setopt($ch, CURLOPT_POSTFIELDS, new Test);

?>
===DONE===
--EXPECTF--
Fatal error: Uncaught Error: Object of class Test could not be converted to string in %s:%d
Stack trace:
#0 %s(%d): curl_setopt(Object(CurlHandle), %d, Object(Test))
#1 {main}
  thrown in %s on line %d