From 84dcc8b6dc10e2fd9fefe86e28c6dff08adc27fd Mon Sep 17 00:00:00 2001 From: nsfisis Date: Mon, 16 Feb 2026 00:59:42 +0900 Subject: fix: avoid passing non-stringable value to print_r() --- src/WebAssembly/Execution/Stack.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/WebAssembly/Execution/Stack.php') diff --git a/src/WebAssembly/Execution/Stack.php b/src/WebAssembly/Execution/Stack.php index 87113a1..ee3d417 100644 --- a/src/WebAssembly/Execution/Stack.php +++ b/src/WebAssembly/Execution/Stack.php @@ -7,6 +7,7 @@ namespace Nsfisis\Waddiwasi\WebAssembly\Execution; use Nsfisis\Waddiwasi\WebAssembly\Structure\Types\ValType; use function assert; use function count; +use function gettype; use function is_float; use function is_int; @@ -96,7 +97,7 @@ final class Stack $result = $this->pop(); assert( is_int($result) || is_float($result) || $result instanceof Ref, - 'Expected a value on the stack, but got ' . print_r($result, true), + 'Expected a value on the stack, but got ' . gettype($result), ); return $result; } -- cgit v1.3-1-g0d28