If the property info comes from an internal parent, we won't have
an xlat entry for it. Leave it alone in that case.
}
}
+// Create reference to a property declared in an internal parent class.
+class MyException extends Exception {
+ public function __construct($message) {
+ $this->message =& $message;
+ }
+}
+
function get_anon() {
return new class {};
}
--- /dev/null
+--TEST--
+Preloading of the property info table with internal parent
+--INI--
+opcache.enable=1
+opcache.enable_cli=1
+opcache.optimization_level=-1
+opcache.preload={PWD}/preload.inc
+--SKIPIF--
+<?php
+require_once('skipif.inc');
+if (PHP_OS_FAMILY == 'Windows') die('skip Preloading is not supported on Windows');
+?>
+--FILE--
+<?php
+$e = new MyException("foo");
+echo $e->getMessage(), "\n";
+?>
+--EXPECT--
+foo
for (i = 0; i < ce->default_properties_count; i++) {
if (ce->properties_info_table[i]) {
- ce->properties_info_table[i] = zend_shared_alloc_get_xlat_entry(
+ zend_property_info *prop_info = zend_shared_alloc_get_xlat_entry(
ce->properties_info_table[i]);
+ if (prop_info) {
+ ce->properties_info_table[i] = prop_info;
+ }
}
}
}