BF prevent bool beeing sent

This commit is contained in:
a6a2f5842 2025-10-03 08:10:16 +02:00
parent 2aa264eb34
commit 76d6b30fdf
1 changed files with 5 additions and 0 deletions

View File

@ -59,6 +59,11 @@ class MockConnection extends Connection implements \Ratchet\ConnectionInterface
return $this; return $this;
} }
// if data is boolean, throw
if (is_bool($data)) {
throw new \InvalidArgumentException('Data must be a string or an object that can be converted to a string.');
}
Log::channel('websocket')->info('[MockConnection] Send for pid: ' . getmypid(), [ Log::channel('websocket')->info('[MockConnection] Send for pid: ' . getmypid(), [
'data' => $data, 'data' => $data,
]); ]);