Skip to content

Commit df9fc63

Browse files
committed
Allow compilation with newer PHP versions (patch by Bob Vincent)
1 parent 45aa53f commit df9fc63

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

php_memcached.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2457,7 +2457,11 @@ zend_object_value php_memc_new(zend_class_entry *ce TSRMLS_DC)
24572457

24582458
i_obj = ecalloc(1, sizeof(*i_obj));
24592459
zend_object_std_init( &i_obj->zo, ce TSRMLS_CC );
2460+
#ifdef ZEND_ENGINE_2_4
2461+
object_properties_init( (zend_object *) i_obj, ce);
2462+
#else
24602463
zend_hash_copy(i_obj->zo.properties, &ce->default_properties, (copy_ctor_func_t) zval_add_ref, (void *) &tmp, sizeof(zval *));
2464+
#endif
24612465

24622466
retval.handle = zend_objects_store_put(i_obj, (zend_objects_store_dtor_t)zend_objects_destroy_object, (zend_objects_free_object_storage_t)php_memc_free_storage, NULL TSRMLS_CC);
24632467
retval.handlers = &memcached_object_handlers;

0 commit comments

Comments
 (0)