From 5b06b1173805b2efc4c0234a4c6c5c6afbdf6b56 Mon Sep 17 00:00:00 2001 From: VennV <111500380+VennDev@users.noreply.github.com> Date: Mon, 19 Aug 2024 00:01:44 +0700 Subject: [PATCH] Fix! --- src/vennv/vapm/ClosureThread.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/vennv/vapm/ClosureThread.php b/src/vennv/vapm/ClosureThread.php index aa36acaaa..fc8c6caff 100644 --- a/src/vennv/vapm/ClosureThread.php +++ b/src/vennv/vapm/ClosureThread.php @@ -69,9 +69,11 @@ public function onRun(): void } else { $callback = (string) $callback; } - /** @var bool|string $callback */ - if (is_bool($callback)) $callback = $callback ? 'true' : 'false'; - if (is_string($callback)) self::post($callback); + if (is_string($callback)) { + self::post($callback); + } elseif (is_bool($callback)) { + self::post($callback ? 'true' : 'false'); + } } }