Skip to content

Commit

Permalink
Merge pull request #15 from Xeath/master
Browse files Browse the repository at this point in the history
fix: unserialize() PHP Warning in PHP 8.3 #14
  • Loading branch information
walkor authored Jun 10, 2024
2 parents fbfb81c + ae2a102 commit 78ba609
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ public static function connect($ip = '127.0.0.1', $port = 2206)
*/
public static function onRemoteMessage($connection, $data)
{
$data = unserialize($data);
$data = unserialize(rtrim($data, "\n"));
$type = $data['type'];
$event = $data['channel'];
$event_data = $data['data'];
Expand Down
2 changes: 1 addition & 1 deletion src/Server.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ public function onMessage($connection, $data)
return;
}
$worker = $this->_worker;
$data = unserialize($data);
$data = unserialize(rtrim($data, "\n"));
$type = $data['type'];
switch($type)
{
Expand Down

0 comments on commit 78ba609

Please sign in to comment.