From a451bf2af5ca2dd7455871c22a9a4a38841090cf Mon Sep 17 00:00:00 2001 From: Ruben Date: Thu, 3 Nov 2016 11:14:31 +0100 Subject: [PATCH] json decode now to array --- src/Server/Websockets.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) {