} else {
std_hnd = zend_get_std_object_handlers();
retval = std_hnd->read_property(object, member, type TSRMLS_CC);
- retval->refcount = 1;
}
if (member == &tmp_member) {
PHP_MINIT_FUNCTION(mysqli)
{
zend_class_entry *ce;
+ zend_object_handlers *std_hnd = zend_get_std_object_handlers();
+
ZEND_INIT_MODULE_GLOBALS(mysqli, php_mysqli_init_globals, NULL);
REGISTER_INI_ENTRIES();
mysqli_object_handlers.clone_obj = NULL;
mysqli_object_handlers.read_property = mysqli_read_property;
mysqli_object_handlers.write_property = mysqli_write_property;
- mysqli_object_handlers.get_property_ptr_ptr = NULL;
+ mysqli_object_handlers.get_property_ptr_ptr = std_hnd->get_property_ptr_ptr;
mysqli_object_handlers.get_constructor = php_mysqli_constructor_get;
zend_hash_init(&classes, 0, NULL, NULL, 1);
--- /dev/null
+--TEST--
+Bug #31141 testcase (properties)
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
+--FILE--
+<?php
+class Test extends mysqli
+{
+ public $test = array();
+
+ function foo()
+ {
+ $ar_test = array("foo", "bar");
+ $this->test = &$ar_test;
+ }
+}
+
+$my_test = new Test;
+$my_test->foo();
+var_dump($my_test->test);
+?>
+--EXPECTF--
+array(2) {
+ [0]=>
+ string(3) "foo"
+ [1]=>
+ string(3) "bar"
+}