From 6989f51ccd79a4b2539905a3243950675e8f7675 Mon Sep 17 00:00:00 2001 From: Ilija Tovilo Date: Mon, 19 Jan 2026 14:35:19 +0100 Subject: [PATCH 1/2] Remove BP_VAR_R handling from zend_std_get_property_ptr_ptr() (GH-20954) zend_std_get_property_ptr_ptr() is meant to be used for modifying operations. --- Zend/zend_object_handlers.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Zend/zend_object_handlers.c b/Zend/zend_object_handlers.c index 07ff4de9244a..d1da6de5191f 100644 --- a/Zend/zend_object_handlers.c +++ b/Zend/zend_object_handlers.c @@ -1391,6 +1391,8 @@ ZEND_API zval *zend_std_get_property_ptr_ptr(zend_object *zobj, zend_string *nam uintptr_t property_offset; const zend_property_info *prop_info = NULL; + ZEND_ASSERT(type != BP_VAR_R && type != BP_VAR_IS); + #if DEBUG_OBJECT_HANDLERS fprintf(stderr, "Ptr object #%d property: %s\n", zobj->handle, ZSTR_VAL(name)); #endif @@ -1412,7 +1414,7 @@ ZEND_API zval *zend_std_get_property_ptr_ptr(zend_object *zobj, zend_string *nam return zend_std_get_property_ptr_ptr(zobj, name, type, cache_slot); } - if (UNEXPECTED(type == BP_VAR_RW || type == BP_VAR_R)) { + if (UNEXPECTED(type == BP_VAR_RW)) { if (prop_info) { zend_typed_property_uninitialized_access(prop_info, name); retval = &EG(error_zval); @@ -1473,7 +1475,7 @@ ZEND_API zval *zend_std_get_property_ptr_ptr(zend_object *zobj, zend_string *nam if (UNEXPECTED(!zobj->properties)) { rebuild_object_properties_internal(zobj); } - if (UNEXPECTED(type == BP_VAR_RW || type == BP_VAR_R)) { + if (UNEXPECTED(type == BP_VAR_RW)) { zend_error(E_WARNING, "Undefined property: %s::$%s", ZSTR_VAL(zobj->ce->name), ZSTR_VAL(name)); } retval = zend_hash_add(zobj->properties, name, &EG(uninitialized_zval)); From ee5fc4a0300bb75350dd3a4d51e237e73e31ff83 Mon Sep 17 00:00:00 2001 From: Ilija Tovilo Date: Mon, 19 Jan 2026 00:32:34 +0100 Subject: [PATCH 2/2] Fix run-tests.php -s flag - Remove unnedded putenv('NO_INTERACTION=1') when executing individual tests. - Fix undefined variable errors when executing individual tests. - Fix -s when NO_INTERACTION=1 is set, given we don't need to prompt anyway. Fixes GH-20961 Closes GH-20970 --- run-tests.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/run-tests.php b/run-tests.php index a661a7f227a0..195d17fa0a03 100755 --- a/run-tests.php +++ b/run-tests.php @@ -697,7 +697,8 @@ function main(): void write_information($user_tests, $phpdbg); if ($test_cnt) { - putenv('NO_INTERACTION=1'); + $exts_tested = []; + $exts_skipped = []; usort($test_files, "test_sort"); $start_timestamp = time(); $start_time = hrtime(true); @@ -777,7 +778,7 @@ function main(): void show_end($start_timestamp, $start_time, $end_time); show_summary(); - save_results($output_file, /* prompt_to_save_results: */ true); + save_results($output_file, /* prompt_to_save_results: */ !$just_save_results); } $junit->saveXML(); @@ -920,7 +921,7 @@ function save_results(string $output_file, bool $prompt_to_save_results): void { global $sum_results, $failed_test_summary, $PHP_FAILED_TESTS, $php; - if (getenv('NO_INTERACTION')) { + if (getenv('NO_INTERACTION') && $prompt_to_save_results) { return; }