From 5c5fbf9b78b56ebf7f93e7bd7f4ebbfcfdeae0da Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Thu, 6 Jun 2019 15:09:35 +0100 Subject: [PATCH] fixed oopses in 287c8c2dd4c4692643c6c0b05cbc24925d39a53c --- src/pocketmine/network/mcpe/protocol/ExplodePacket.php | 2 +- src/pocketmine/network/mcpe/protocol/PlayerListPacket.php | 4 ++-- .../network/mcpe/protocol/ResourcePackStackPacket.php | 4 ++-- .../network/mcpe/protocol/ResourcePacksInfoPacket.php | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/pocketmine/network/mcpe/protocol/ExplodePacket.php b/src/pocketmine/network/mcpe/protocol/ExplodePacket.php index fada68783..579c89629 100644 --- a/src/pocketmine/network/mcpe/protocol/ExplodePacket.php +++ b/src/pocketmine/network/mcpe/protocol/ExplodePacket.php @@ -48,7 +48,7 @@ class ExplodePacket extends DataPacket implements ClientboundPacket{ * @return ExplodePacket */ public static function create(Vector3 $center, float $radius, array $records) : self{ - (function(Vector3 ...$_){})($records); + (function(Vector3 ...$_){})(...$records); $result = new self; $result->position = $center; $result->radius = $radius; diff --git a/src/pocketmine/network/mcpe/protocol/PlayerListPacket.php b/src/pocketmine/network/mcpe/protocol/PlayerListPacket.php index 8910b7323..653548fef 100644 --- a/src/pocketmine/network/mcpe/protocol/PlayerListPacket.php +++ b/src/pocketmine/network/mcpe/protocol/PlayerListPacket.php @@ -44,7 +44,7 @@ class PlayerListPacket extends DataPacket implements ClientboundPacket{ public $type; public static function add(array $entries) : self{ - (function(PlayerListEntry ...$_){})($entries); + (function(PlayerListEntry ...$_){})(...$entries); $result = new self; $result->type = self::TYPE_ADD; $result->entries = $entries; @@ -52,7 +52,7 @@ class PlayerListPacket extends DataPacket implements ClientboundPacket{ } public static function remove(array $entries) : self{ - (function(PlayerListEntry ...$_){})($entries); + (function(PlayerListEntry ...$_){})(...$entries); $result = new self; $result->type = self::TYPE_REMOVE; $result->entries = $entries; diff --git a/src/pocketmine/network/mcpe/protocol/ResourcePackStackPacket.php b/src/pocketmine/network/mcpe/protocol/ResourcePackStackPacket.php index eed28a945..ae5cbac5d 100644 --- a/src/pocketmine/network/mcpe/protocol/ResourcePackStackPacket.php +++ b/src/pocketmine/network/mcpe/protocol/ResourcePackStackPacket.php @@ -54,8 +54,8 @@ class ResourcePackStackPacket extends DataPacket implements ClientboundPacket{ * @return ResourcePackStackPacket */ public static function create(array $resourcePacks, array $behaviorPacks, bool $mustAccept, bool $isExperimental = false) : self{ - (function(ResourcePack ...$_){})($resourcePacks); - (function(ResourcePack ...$_){})($behaviorPacks); + (function(ResourcePack ...$_){})(...$resourcePacks); + (function(ResourcePack ...$_){})(...$behaviorPacks); $result = new self; $result->mustAccept = $mustAccept; $result->resourcePackStack = $resourcePacks; diff --git a/src/pocketmine/network/mcpe/protocol/ResourcePacksInfoPacket.php b/src/pocketmine/network/mcpe/protocol/ResourcePacksInfoPacket.php index bf55daf45..a57e877ac 100644 --- a/src/pocketmine/network/mcpe/protocol/ResourcePacksInfoPacket.php +++ b/src/pocketmine/network/mcpe/protocol/ResourcePacksInfoPacket.php @@ -51,8 +51,8 @@ class ResourcePacksInfoPacket extends DataPacket implements ClientboundPacket{ * @return ResourcePacksInfoPacket */ public static function create(array $resourcePacks, array $behaviorPacks, bool $mustAccept, bool $hasScripts = false) : self{ - (function(ResourcePack ...$_){})($resourcePacks); - (function(ResourcePack ...$_){})($behaviorPacks); + (function(ResourcePack ...$_){})(...$resourcePacks); + (function(ResourcePack ...$_){})(...$behaviorPacks); $result = new self; $result->mustAccept = $mustAccept; $result->hasScripts = $hasScripts;