Skip to content

Commit

Permalink
Fix segfault when GC is on
Browse files Browse the repository at this point in the history
(cherry picked from commit c4afe0a)
  • Loading branch information
sjinks committed Aug 3, 2013
1 parent 134186b commit 45fbecb
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion ext/config.c
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,11 @@ static HashTable* phalcon_config_get_properties(zval* object TSRMLS_DC)
{
HashTable* props = zend_std_get_properties(object TSRMLS_CC);
phalcon_config_object* obj = fetchPhalconConfigObject(object TSRMLS_CC);
zend_hash_copy(props, obj->props, (copy_ctor_func_t)zval_add_ref, NULL, sizeof(zval*));

if (!GC_G(gc_active)) {
zend_hash_copy(props, obj->props, (copy_ctor_func_t)zval_add_ref, NULL, sizeof(zval*));
}

return props;
}

Expand Down

0 comments on commit 45fbecb

Please sign in to comment.