json decode now to array
This commit is contained in:
parent
e02a7a7d3e
commit
a451bf2af5
1 changed files with 1 additions and 1 deletions
|
@ -31,7 +31,7 @@ class Websockets implements MessageComponentInterface
|
||||||
echo sprintf('Connection %d sending message "%s"' . "\n"
|
echo sprintf('Connection %d sending message "%s"' . "\n"
|
||||||
, $from->resourceId, $msg);
|
, $from->resourceId, $msg);
|
||||||
|
|
||||||
$data = @json_decode($msg);
|
$data = @json_decode($msg, true);
|
||||||
if(!empty($data) && $data['action'] == 'update' && isset($data['method']))
|
if(!empty($data) && $data['action'] == 'update' && isset($data['method']))
|
||||||
{
|
{
|
||||||
foreach ($this->clients as $client) {
|
foreach ($this->clients as $client) {
|
||||||
|
|
Loading…
Reference in a new issue