From 06a72afcf042163fa74b7c239adfffde0ae8c668 Mon Sep 17 00:00:00 2001 From: Gina Peter Banyard Date: Tue, 7 Jan 2025 09:26:35 +0000 Subject: [PATCH] Fix test --- .../tests/preg_replace_callback_array_trampoline.phpt | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/ext/pcre/tests/preg_replace_callback_array_trampoline.phpt b/ext/pcre/tests/preg_replace_callback_array_trampoline.phpt index eb13a803a0d4..753006175b87 100644 --- a/ext/pcre/tests/preg_replace_callback_array_trampoline.phpt +++ b/ext/pcre/tests/preg_replace_callback_array_trampoline.phpt @@ -23,7 +23,7 @@ $regexesToTest = [ ], [ '@\b\w{1,2}\b@' => $callback, - '~\A.~' => $trampolineThrow, + '~\A.~' => $callbackThrow, ], [ '@\b\w{1,2}\b@' => $callback, @@ -58,7 +58,6 @@ foreach ($regexesToTest as $regex) { ?> --EXPECTF-- -Warning: Undefined variable $trampolineThrow in %s on line %d Trampoline for trampoline Trampoline for trampoline Trampoline for trampoline @@ -91,10 +90,12 @@ Trampoline for trampoline Trampoline for trampoline Warning: Array to string conversion in %s on line %d -TypeError: preg_replace_callback_array(): Argument #1 ($pattern) must contain only valid callbacks +Trampoline for trampolineThrow +Exception: boo Trampoline for trampoline Trampoline for trampoline -TypeError: preg_replace_callback_array(): Argument #1 ($pattern) must contain only valid callbacks +Trampoline for trampolineThrow +Exception: boo Error: Object of class stdClass could not be converted to string TypeError: preg_replace_callback_array(): Argument #2 ($subject) must be of type array|string, stdClass given Trampoline for trampoline