Fix 5.4.x compile issue #20

Merged
merged 1 commit into from Apr 2, 2013

2 participants

@JeremyWei

When compile under 5.4, it failed. the code in master not works:

#if PHP_VERSION_ID >= 50400
object_properties_init( (zend_object *) i_obj, ce);
#else
zend_hash_copy(i_obj->zo.properties, &ce->default_properties, (copy_ctor_func_t) zval_add_ref, (void *) &tmp, sizeof(zval *));
#endif

So I change to the method below, and it works now:

#if PHP_VERSION_ID < 50399
zend_hash_copy(i_obj->zo.properties, &ce->default_properties, (copy_ctor_func_t) zval_add_ref, (void *) &tmp, sizeof(zval *));
#else
object_properties_init( (zend_object *) i_obj, ce);
#endif

here is bug : https://bugs.php.net/bug.php?id=64336

@andreiz andreiz merged commit 5b4bad5 into andreiz:master Apr 2, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment