[php-src] master: [`%pS` migration] Use `%pS` in Zend/zend_execute_API.c

From: Date: Fri, 30 Oct 2026 01:10:52 +0000
Subject: [php-src] master: [`%pS` migration] Use `%pS` in Zend/zend_execute_API.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-142983@lists.php.net to get a copy of this message
Author: Daniel Scherzer (DanielEScherzer) Date: 2026-10-29T17:58:20-07:00 Commit: https://github.com/php/php-src/commit/ea78eb60ed18f2932dd9d041566b1f0db232dfc5 Raw diff: https://github.com/php/php-src/commit/ea78eb60ed18f2932dd9d041566b1f0db232dfc5.diff [%pS migration] Use %pS in Zend/zend_execute_API.c Changed paths: M Zend/zend_execute_API.c M ext/standard/tests/serialize/unserialize_callback_func/fn_with_null_bytes.phpt Diff: diff --git a/Zend/zend_execute_API.c b/Zend/zend_execute_API.c index 4864b5607f27..b9e992ff8a0e 100644 --- a/Zend/zend_execute_API.c +++ b/Zend/zend_execute_API.c @@ -877,7 +877,7 @@ zend_result zend_call_function(zend_fcall_info *fci, zend_fcall_info_cache *fci_ ZEND_ASSERT(error && "Should have error if not callable"); zend_string *callable_name = zend_get_callable_name_ex(&fci->function_name, fci->object); - zend_throw_error(NULL, "Invalid callback %s, %s", ZSTR_VAL(callable_name), error); + zend_throw_error(NULL, "Invalid callback %pS, %s", callable_name, error); efree(error); zend_string_release_ex(callable_name, 0); return SUCCESS; @@ -1776,11 +1776,11 @@ static ZEND_COLD void report_class_fetch_error(const zend_string *class_name, ui } if ((fetch_type & ZEND_FETCH_CLASS_MASK) == ZEND_FETCH_CLASS_INTERFACE) { - zend_throw_or_error(fetch_type, NULL, "Interface \"%s\" not found", ZSTR_VAL(class_name)); + zend_throw_or_error(fetch_type, NULL, "Interface \"%pS\" not found", class_name); } else if ((fetch_type & ZEND_FETCH_CLASS_MASK) == ZEND_FETCH_CLASS_TRAIT) { - zend_throw_or_error(fetch_type, NULL, "Trait \"%s\" not found", ZSTR_VAL(class_name)); + zend_throw_or_error(fetch_type, NULL, "Trait \"%pS\" not found", class_name); } else { - zend_throw_or_error(fetch_type, NULL, "Class \"%s\" not found", ZSTR_VAL(class_name)); + zend_throw_or_error(fetch_type, NULL, "Class \"%pS\" not found", class_name); } } diff --git a/ext/standard/tests/serialize/unserialize_callback_func/fn_with_null_bytes.phpt b/ext/standard/tests/serialize/unserialize_callback_func/fn_with_null_bytes.phpt index 5341d4bb6dd8..d3b9b6fbb430 100644 --- a/ext/standard/tests/serialize/unserialize_callback_func/fn_with_null_bytes.phpt +++ b/ext/standard/tests/serialize/unserialize_callback_func/fn_with_null_bytes.phpt @@ -20,6 +20,6 @@ try { echo "Done"; ?> ---EXPECT-- -Error: Invalid callback foo, function "foo" not found or invalid function name +--EXPECTF-- +Error: Invalid callback foo%0butno, function "foo" not found or invalid function name Done

« previous php.cvs (#142983) next »