diff options
author | Xinchen Hui <laruence@gmail.com> | 2015-12-30 05:04:21 -0800 |
---|---|---|
committer | Xinchen Hui <laruence@gmail.com> | 2015-12-30 05:04:21 -0800 |
commit | 90d2f509e2164b60fc7bc8407e63504c910cce11 (patch) | |
tree | fb9556840dd2d992edf7b523c723a080a06890d0 /ext/standard/streamsfuncs.c | |
parent | 3f07a256f75a55eaf7e7bfed681f8dfb4b901e55 (diff) | |
download | php-git-90d2f509e2164b60fc7bc8407e63504c910cce11.tar.gz |
Fixed bug #71245 (file_get_contents() ignores "header" context option if it's a reference)
Diffstat (limited to 'ext/standard/streamsfuncs.c')
-rw-r--r-- | ext/standard/streamsfuncs.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/ext/standard/streamsfuncs.c b/ext/standard/streamsfuncs.c index f257ef85e6..bc8c8557de 100644 --- a/ext/standard/streamsfuncs.c +++ b/ext/standard/streamsfuncs.c @@ -881,10 +881,11 @@ static int parse_context_options(php_stream_context *context, zval *options) int ret = SUCCESS; ZEND_HASH_FOREACH_STR_KEY_VAL(Z_ARRVAL_P(options), wkey, wval) { - if (wkey && Z_TYPE_P(wval) == IS_ARRAY) { - + ZVAL_DEREF(wval); + if (Z_TYPE_P(wval) == IS_ARRAY) { ZEND_HASH_FOREACH_STR_KEY_VAL(Z_ARRVAL_P(wval), okey, oval) { if (okey) { + ZVAL_DEREF(oval); php_stream_context_set_option(context, ZSTR_VAL(wkey), ZSTR_VAL(okey), oval); } } ZEND_HASH_FOREACH_END(); |