return ok;
}
- #ifdef ZEND_WIN32
- /* On Windows we can't link with internal class, because of ASLR */
- if (ce->type == ZEND_INTERNAL_CLASS) {
- return NULL;
- }
- #endif
+static zend_class_entry *preload_fetch_resolved_ce(zend_string *name, zend_class_entry *self_ce) {
+ zend_string *lcname = zend_string_tolower(name);
+ zend_class_entry *ce = zend_hash_find_ptr(EG(class_table), lcname);
+ zend_string_release(lcname);
+ if (!ce) {
+ return NULL;
+ }
+ if (ce == self_ce) {
+ /* Ignore the following requirements if this is the class referring to itself */
+ return ce;
+ }
+ if (!(ce->ce_flags & ZEND_ACC_CONSTANTS_UPDATED)) {
+ return NULL;
+ }
+ if (!(ce->ce_flags & ZEND_ACC_PROPERTY_TYPES_RESOLVED)) {
+ return NULL;
+ }
+ return ce;
+}
+
static zend_bool preload_try_resolve_property_types(zend_class_entry *ce)
{
zend_bool ok = 1;
opcache.optimization_level=-1
opcache.preload={PWD}/preload_const_autoload.inc
--SKIPIF--
- <?php require_once('skipif.inc'); ?>
+ <?php
+ require_once('skipif.inc');
+ if (PHP_OS_FAMILY == 'Windows') die('skip Preloading is not supported on Windows');
+ ?>
--FILE--
-===DONE===
--EXPECTF--
Warning: Can't preload class Test with unresolved initializer for constant C in %s on line %d
-===DONE===