Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix wrong macro usage and add missing NEWS entry

  • Loading branch information...
commit b7788c52f1e30e425795870e0a1450a620a41f08 1 parent cc51729
@nikic nikic authored
Showing with 3 additions and 1 deletion.
  1. +2 −0  NEWS
  2. +1 −1  Zend/zend_API.c
View
2  NEWS
@@ -10,6 +10,8 @@ PHP NEWS
details here: https://wiki.php.net/rfc/cli_process_title. (Keyur)
. Fixed bug #64370 (microtime(true) less than $_SERVER['REQUEST_TIME_FLOAT']).
(Anatol)
+ . Added support for non-scalar Iterator keys in foreach
+ (https://wiki.php.net/rfc/foreach-non-scalar-keys). (Nikita Popov)
- mysqlnd
. Fixed bug #63530 (mysqlnd_stmt::bind_one_parameter crashes, uses wrong alloc
View
2  Zend/zend_API.c
@@ -1521,7 +1521,7 @@ ZEND_API int array_set_zval_key(HashTable *ht, zval *key, zval *value) /* {{{ */
result = zend_hash_index_update(ht, Z_LVAL_P(key), &value, sizeof(zval *), NULL);
break;
case IS_DOUBLE:
- result = zend_hash_index_update(ht, zend_dval_to_lval(Z_LVAL_P(key)), &value, sizeof(zval *), NULL);
+ result = zend_hash_index_update(ht, zend_dval_to_lval(Z_DVAL_P(key)), &value, sizeof(zval *), NULL);
break;
default:
zend_error(E_WARNING, "Illegal offset type");

1 comment on commit b7788c5

@reeze

and the test need to be fixed too :)

cat ext/spl/tests/iterator_to_array_nonscalar_keys.diff
009+   [2]=>
009-   [0]=>
Please sign in to comment.
Something went wrong with that request. Please try again.