php-src/ext/json
Máté Kocsis 8d12f666ae
Fix registration of internal readonly child classes (#15459)
Currently, internal classes are registered with the following code:

INIT_CLASS_ENTRY(ce, "InternalClass", class_InternalClass_methods);
class_entry = zend_register_internal_class_ex(&ce, NULL);
class_entry->ce_flags |= ...;

This has worked well so far, except if InternalClass is readonly. It is because some inheritance checks are run by zend_register_internal_class_ex before ZEND_ACC_READONLY_CLASS is added to ce_flags.

The issue is fixed by adding a zend_register_internal_class_with_flags() zend API function that stubs can use from now on. This function makes sure to add the flags before running any checks. Since the new API is not available in lower PHP versions, gen_stub.php has to keep support for the existing API for PHP 8.3 and below.
2024-08-24 12:36:54 +02:00
..
tests Introduce Zend guard recursion protection 2023-08-24 13:03:14 +01:00
config.m4 Autotools: Normalize headers arguments (#15149) 2024-07-29 10:08:17 +02:00
config.w32 Sync headers installation 2024-01-28 19:50:55 +01:00
CREDITS Initial import of jsond 2014-11-13 20:20:46 +00:00
json_arginfo.h Fix registration of internal readonly child classes (#15459) 2024-08-24 12:36:54 +02:00
json_encoder.c [RFC] Property hooks (#13455) 2024-07-14 11:55:03 +02:00
json_parser.y Fix strict prototypes warnings 2023-02-17 15:14:30 +01:00
json_scanner.re ext/json: Fix sign conversion warnings 2024-06-08 17:15:01 +01:00
json.c Trim trailing whitespace (#14721) 2024-06-29 18:41:45 +02:00
json.stub.php RFC - json_validate() (#9399) 2022-10-08 09:21:59 -04:00
Makefile.frag Define default RE2C_FLAGS (#14615) 2024-06-24 22:09:04 +02:00
Makefile.frag.w32 Define default RE2C_FLAGS (#14615) 2024-06-24 22:09:04 +02:00
php_json_encoder.h Fix -Wenum-int-mismatch warning in ext/json/php_json_encoder.h 2023-05-14 22:10:23 +02:00
php_json_parser.h RFC - json_validate() (#9399) 2022-10-08 09:21:59 -04:00
php_json_scanner.h Update http->https in license (#6945) 2021-05-06 12:16:35 +02:00
php_json.h Merge branch 'PHP-8.2' 2023-05-13 18:54:16 +01:00