mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
Fixed bug #79741
This commit is contained in:
parent
4a26628b29
commit
43cd3f6814
3 changed files with 22 additions and 2 deletions
4
NEWS
4
NEWS
|
@ -6,6 +6,10 @@ PHP NEWS
|
||||||
. Fixed bug #79030 (Upgrade apache2handler's php_apache_sapi_get_request_time
|
. Fixed bug #79030 (Upgrade apache2handler's php_apache_sapi_get_request_time
|
||||||
to return usec). (Herbert256)
|
to return usec). (Herbert256)
|
||||||
|
|
||||||
|
- Curl:
|
||||||
|
. Fixed bug #79741 (curl_setopt CURLOPT_POSTFIELDS asserts on object with
|
||||||
|
declared properties). (Nikita)
|
||||||
|
|
||||||
- FTP:
|
- FTP:
|
||||||
. Fixed bug #55857 (ftp_size on large files). (cmb)
|
. Fixed bug #55857 (ftp_size on large files). (cmb)
|
||||||
|
|
||||||
|
|
|
@ -2719,7 +2719,7 @@ static int _php_curl_setopt(php_curl *ch, zend_long option, zval *zvalue) /* {{{
|
||||||
return FAILURE;
|
return FAILURE;
|
||||||
}
|
}
|
||||||
|
|
||||||
ZEND_HASH_FOREACH_VAL(ph, current) {
|
ZEND_HASH_FOREACH_VAL_IND(ph, current) {
|
||||||
ZVAL_DEREF(current);
|
ZVAL_DEREF(current);
|
||||||
val = zval_get_tmp_string(current, &tmp_val);
|
val = zval_get_tmp_string(current, &tmp_val);
|
||||||
slist = curl_slist_append(slist, ZSTR_VAL(val));
|
slist = curl_slist_append(slist, ZSTR_VAL(val));
|
||||||
|
@ -2797,7 +2797,7 @@ static int _php_curl_setopt(php_curl *ch, zend_long option, zval *zvalue) /* {{{
|
||||||
}
|
}
|
||||||
#endif
|
#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;
|
zend_string *postval, *tmp_postval;
|
||||||
/* Pretend we have a string_key here */
|
/* Pretend we have a string_key here */
|
||||||
if (!string_key) {
|
if (!string_key) {
|
||||||
|
|
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