mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
commit
f930978b70
2 changed files with 18 additions and 2 deletions
|
@ -2046,7 +2046,7 @@ static inline int build_mime_structure_from_hash(php_curl *ch, zval *zpostfields
|
|||
}
|
||||
#endif
|
||||
|
||||
ZEND_HASH_FOREACH_KEY_VAL(postfields, num_key, string_key, current) {
|
||||
ZEND_HASH_FOREACH_KEY_VAL_IND(postfields, num_key, string_key, current) {
|
||||
zend_string *postval, *tmp_postval;
|
||||
/* Pretend we have a string_key here */
|
||||
if (!string_key) {
|
||||
|
@ -2702,7 +2702,7 @@ static int _php_curl_setopt(php_curl *ch, zend_long option, zval *zvalue) /* {{{
|
|||
return FAILURE;
|
||||
}
|
||||
|
||||
ZEND_HASH_FOREACH_VAL(ph, current) {
|
||||
ZEND_HASH_FOREACH_VAL_IND(ph, current) {
|
||||
ZVAL_DEREF(current);
|
||||
val = zval_get_tmp_string(current, &tmp_val);
|
||||
slist = curl_slist_append(slist, ZSTR_VAL(val));
|
||||
|
|
16
ext/curl/tests/bug79741.phpt
Normal file
16
ext/curl/tests/bug79741.phpt
Normal file
|
@ -0,0 +1,16 @@
|
|||
--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===
|
||||
--EXPECT--
|
||||
===DONE===
|
Loading…
Add table
Add a link
Reference in a new issue