diff options
| author | nsfisis <nsfisis@gmail.com> | 2026-02-16 00:59:42 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2026-02-16 01:00:34 +0900 |
| commit | 84dcc8b6dc10e2fd9fefe86e28c6dff08adc27fd (patch) | |
| tree | 9237855f5a8dc5119049c8fc560475c2c09975e2 | |
| parent | 2656a7d724c2738bd8fa8d3a876a1228642bf54e (diff) | |
| download | php-waddiwasi-84dcc8b6dc10e2fd9fefe86e28c6dff08adc27fd.tar.gz php-waddiwasi-84dcc8b6dc10e2fd9fefe86e28c6dff08adc27fd.tar.zst php-waddiwasi-84dcc8b6dc10e2fd9fefe86e28c6dff08adc27fd.zip | |
fix: avoid passing non-stringable value to print_r()
| -rw-r--r-- | src/WebAssembly/Execution/Stack.php | 3 |
1 files changed, 2 insertions, 1 deletions
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; } |
