Download src/php/php-src/ext/curl/tests/bug79741.phpt from meddyrat/dis-bench: direct link, hf CLI and curl.
- Browser
- Download file 471 Bytes
-
https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/ext/curl/tests/bug79741.phpt
- Command line
-
hf download hf://datasets/meddyrat/dis-bench/src/php/php-src/ext/curl/tests/bug79741.phpt
-
curl -L -o bug79741.phpt https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/ext/curl/tests/bug79741.phpt
471 Bytes
| --TEST-- | |
| Bug #79741: curl_setopt CURLOPT_POSTFIELDS asserts on object with declared properties | |
| --EXTENSIONS-- | |
| curl | |
| --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 | |