Commit ea78eb60ed1 for php
commit ea78eb60ed18f2932dd9d041566b1f0db232dfc5
Author: Daniel Scherzer <daniel.e.scherzer@gmail.com>
Date: Sat Aug 8 08:37:25 2026 -0700
[`%pS` migration] Use `%pS` in Zend/zend_execute_API.c
diff --git a/Zend/zend_execute_API.c b/Zend/zend_execute_API.c
index 4864b5607f2..b9e992ff8a0 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 5341d4bb6dd..d3b9b6fbb43 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 @@ function foo(string $name) {
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