mirror of
https://github.com/php/php-src.git
synced 2024-09-22 02:17:32 +00:00
This should be better
This commit is contained in:
parent
90d2f509e2
commit
da028e0757
@ -885,7 +885,6 @@ static int parse_context_options(php_stream_context *context, zval *options)
|
|||||||
if (Z_TYPE_P(wval) == IS_ARRAY) {
|
if (Z_TYPE_P(wval) == IS_ARRAY) {
|
||||||
ZEND_HASH_FOREACH_STR_KEY_VAL(Z_ARRVAL_P(wval), okey, oval) {
|
ZEND_HASH_FOREACH_STR_KEY_VAL(Z_ARRVAL_P(wval), okey, oval) {
|
||||||
if (okey) {
|
if (okey) {
|
||||||
ZVAL_DEREF(oval);
|
|
||||||
php_stream_context_set_option(context, ZSTR_VAL(wkey), ZSTR_VAL(okey), oval);
|
php_stream_context_set_option(context, ZSTR_VAL(wkey), ZSTR_VAL(okey), oval);
|
||||||
}
|
}
|
||||||
} ZEND_HASH_FOREACH_END();
|
} ZEND_HASH_FOREACH_END();
|
||||||
|
@ -2244,9 +2244,8 @@ PHPAPI int php_stream_context_set_option(php_stream_context *context,
|
|||||||
return FAILURE;
|
return FAILURE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (Z_REFCOUNTED_P(optionvalue)) {
|
ZVAL_DEREF(optionvalue);
|
||||||
Z_ADDREF_P(optionvalue);
|
Z_TRY_ADDREF_P(optionvalue);
|
||||||
}
|
|
||||||
return zend_hash_str_update(Z_ARRVAL_P(wrapperhash), optionname, strlen(optionname), optionvalue) ? SUCCESS : FAILURE;
|
return zend_hash_str_update(Z_ARRVAL_P(wrapperhash), optionname, strlen(optionname), optionvalue) ? SUCCESS : FAILURE;
|
||||||
}
|
}
|
||||||
/* }}} */
|
/* }}} */
|
||||||
|
Loading…
Reference in New Issue
Block a user