json decode now to array

This commit is contained in:
Ruben 2016-11-03 11:14:31 +01:00
parent e02a7a7d3e
commit a451bf2af5
1 changed files with 1 additions and 1 deletions

View File

@ -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) {