Skip to content

Commit

Permalink
Updated
Browse files Browse the repository at this point in the history
  • Loading branch information
dreamsxin committed Oct 19, 2019
1 parent cc3f18b commit eac2383
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion ext/kernel/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ int zephir_get_global(zval *arr, const char *global, unsigned int global_length)
if ((gv = zend_hash_find_ind(&EG(symbol_table), str)) != NULL) {
ZVAL_DEREF(gv);
if (Z_TYPE_P(gv) == IS_ARRAY) {
if (Z_REFCOUNTED_P(gv)) {
if (Z_REFCOUNTED_P(gv) && Z_REFCOUNT_P(gv) <= 1) {
ZVAL_COPY_VALUE(arr, gv);
} else {
ZVAL_DUP(arr, gv);
Expand Down
2 changes: 1 addition & 1 deletion kernels/ZendEngine3/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ int zephir_get_global(zval *arr, const char *global, unsigned int global_length)
if ((gv = zend_hash_find_ind(&EG(symbol_table), str)) != NULL) {
ZVAL_DEREF(gv);
if (Z_TYPE_P(gv) == IS_ARRAY) {
if (Z_REFCOUNTED_P(gv)) {
if (Z_REFCOUNTED_P(gv) && Z_REFCOUNT_P(gv) <= 1) {
ZVAL_COPY_VALUE(arr, gv);
} else {
ZVAL_DUP(arr, gv);
Expand Down

0 comments on commit eac2383

Please sign in to comment.