Skip to content

Commit

Permalink
statics #147
Browse files Browse the repository at this point in the history
  • Loading branch information
krakjoe committed Jul 28, 2021
1 parent 81e86d4 commit 18816c0
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/function.c
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ zend_bool uopz_get_static(zend_class_entry *clazz, zend_string *function, zval *
}

HashTable *variables = ZEND_MAP_PTR_GET(entry->op_array.static_variables_ptr);

if (!variables) {
ZEND_MAP_PTR_INIT(
entry->op_array.static_variables_ptr,
Expand All @@ -338,10 +338,7 @@ zend_bool uopz_get_static(zend_class_entry *clazz, zend_string *function, zval *
variables = ZEND_MAP_PTR_GET(entry->op_array.static_variables_ptr);
}

ZVAL_ARR(return_value, variables);
if (!(GC_FLAGS(variables) & IS_ARRAY_IMMUTABLE)) {
GC_ADDREF(variables);
}
ZVAL_ARR(return_value, zend_array_dup(variables));
return 1;
} /* }}} */

Expand Down

0 comments on commit 18816c0

Please sign in to comment.