Skip to content

Commit ab2af45

Browse files
committed
Fix class construction
1 parent eda544c commit ab2af45

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/types/object.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ use crate::{
1010
error::{Error, Result},
1111
ffi::{
1212
ext_php_rs_zend_object_release, zend_call_known_function, zend_object, zend_objects_new,
13-
HashTable, ZEND_ISEMPTY, ZEND_PROPERTY_EXISTS, ZEND_PROPERTY_ISSET, zend_hash_str_find_ptr_lc, zend_function,
13+
HashTable, ZEND_ISEMPTY, ZEND_PROPERTY_EXISTS, ZEND_PROPERTY_ISSET, zend_hash_str_find_ptr_lc, zend_function, object_properties_init,
1414
},
1515
flags::DataType,
1616
rc::PhpRc,
@@ -42,6 +42,7 @@ impl ZendObject {
4242
// `*mut` is valid as the function will not mutate `ce`.
4343
unsafe {
4444
let ptr = zend_objects_new(ce as *const _ as *mut _);
45+
object_properties_init(ptr, ce as *const _ as *mut _);
4546
ZBox::from_raw(
4647
ptr.as_mut()
4748
.expect("Failed to allocate memory for Zend object"),

0 commit comments

Comments
 (0)