diff --git a/Process.php b/Process.php index 19316de..c81d168 100755 --- a/Process.php +++ b/Process.php @@ -79,7 +79,7 @@ private function inWork() */ private function push(string $handle, array $data): \Symfony\Component\Process\Process { - $cmd = HtmlPurifier::process(sprintf('php yii socketio/process %s %s', escapeshellarg($handle), escapeshellarg(serialize($data)))); + $cmd = HtmlPurifier::process(sprintf('php yii socketio/process %s %s', escapeshellarg($handle), escapeshellarg(json_encode($data)))); if (is_null($this->yiiAlias)) { if (file_exists(Yii::getAlias('@app/yii'))) { diff --git a/commands/CommandTrait.php b/commands/CommandTrait.php index daf8255..783d871 100644 --- a/commands/CommandTrait.php +++ b/commands/CommandTrait.php @@ -31,7 +31,7 @@ trait CommandTrait */ public function actionProcess($handler, $data) { - Broadcast::process($handler, @unserialize($data) ?? []); + Broadcast::process($handler, @json_decode($data, true) ?? []); } public function nodejs()