. Added SQLite3::setAuthorizer() and respective class constants. (bohwaz)
- Standard:
+ . Implemented FR #78638 (__PHP_Incomplete_Class should be final). (Laruence)
. Fixed bug #77204 (getimagesize(): Read error! should mention file path).
(peter279k)
. Fixed bug #76859 (stream_get_line skips data if used with data-generating
PHPAPI zend_class_entry *php_create_incomplete_class(void)
{
- zend_class_entry incomplete_class;
+ zend_class_entry incomplete_class, *incomplete_class_entry;
INIT_CLASS_ENTRY(incomplete_class, INCOMPLETE_CLASS, NULL);
+
incomplete_class.create_object = php_create_incomplete_object;
memcpy(&php_incomplete_object_handlers, &std_object_handlers, sizeof(zend_object_handlers));
php_incomplete_object_handlers.get_property_ptr_ptr = incomplete_class_get_property_ptr_ptr;
php_incomplete_object_handlers.get_method = incomplete_class_get_method;
- return zend_register_internal_class(&incomplete_class);
+ incomplete_class_entry = zend_register_internal_class(&incomplete_class);
+ incomplete_class_entry->ce_flags |= ZEND_ACC_FINAL;
+
+ return incomplete_class_entry;
}
/* }}} */
--- /dev/null
+--TEST--
+FR: #78638 (__PHP_Incomplete_Class should be final)
+--FILE--
+<?php
+$c = new class('bar') extends __PHP_Incomplete_Class {
+};
+?>
+--EXPECTF--
+Fatal error: Class class@anonymous may not inherit from final class (__PHP_Incomplete_Class) in %sbug78638.php on line %d