diff --git a/src/Server/Websockets.php b/src/Server/Websockets.php index 01fe832..d82863c 100644 --- a/src/Server/Websockets.php +++ b/src/Server/Websockets.php @@ -31,7 +31,7 @@ class Websockets implements MessageComponentInterface echo sprintf('Connection %d sending message "%s"' . "\n" , $from->resourceId, $msg); - $data = @json_decode($msg); + $data = @json_decode($msg, true); if(!empty($data) && $data['action'] == 'update' && isset($data['method'])) { foreach ($this->clients as $client) {