Closed StefanFox-Dev closed 1 year ago
Link to crashdump:
Error: Declaration of callable function ( $typeConverter ) must be compatible with function ( pocketmine\network\mcpe\convert\TypeConverter $typeConverter ) : array File: pmsrc/src/utils/Utils Line: 550 Type: TypeError Backtrace:
function ( $typeConverter )
function ( pocketmine\network\mcpe\convert\TypeConverter $typeConverter ) : array
Code: [541] [542] @throws \DaveRandom\CallbackValidator\InvalidCallbackException [543] @throws \TypeError [544] / [545] public static function validateCallableSignature(callable|CallbackType $signature, callable $subject) : void{ [546] if(!($signature instanceof CallbackType)){ [547] $signature = CallbackType::createFromCallable($signature); [548] } [549] if(!$signature->isSatisfiedBy($subject)){ [550] throw new \TypeError("Declaration of callable " . CallbackType::createFromCallable($subject) . " must be compatible with " . $signature . ""); [551] } [552] } [553] [554] /* [555] @phpstan-template TMemberType [556] @phpstan-param array<mixed, TMemberType> $array [557] @phpstan-param \Closure(TMemberType) : void $validator [558] */ [559] public static function validateArrayValueType(array $array, \Closure $validator) : void{ [560] foreach($array as $k => $v){
" . CallbackType::createFromCallable($subject) . "
" . $signature . "
@dries-c
Link to crashdump:
Error: Declaration of callable
function ( $typeConverter )
must be compatible withfunction ( pocketmine\network\mcpe\convert\TypeConverter $typeConverter ) : array
File: pmsrc/src/utils/Utils Line: 550 Type: TypeError Backtrace:0 pmsrc/src/network/mcpe/convert/TypeConverter(304): pocketmine\utils\Utils::validateCallableSignature(object DaveRandom\CallbackValidator\CallbackType#304471, object Closure#396181)
1 pmsrc/src/block/Bell(159): pocketmine\network\mcpe\convert\TypeConverter::broadcastByTypeConverter(array[1], object Closure#396181)
2 pmsrc/src/block/Bell(138): pocketmine\block\Bell->ring(int 3)
3 pmsrc/src/world/World(2099): pocketmine\block\Bell->onInteract(object pocketmine\item\ItemBlock#145647, int 3, object pocketmine\math\Vector3#66339, object pocketmine\player\Player#306305, array[0])
4 pmsrc/src/player/Player(1812): pocketmine\world\World->useItemOn(object pocketmine\math\Vector3#181282, object pocketmine\item\ItemBlock#145647, int 3, object pocketmine\math\Vector3#66339, object pocketmine\player\Player#306305, true, array[0])
5 pmsrc/src/network/mcpe/handler/InGamePacketHandler(491): pocketmine\player\Player->interactBlock(object pocketmine\math\Vector3#181282, int 3, object pocketmine\math\Vector3#285285)
6 pmsrc/src/network/mcpe/handler/InGamePacketHandler(344): pocketmine\network\mcpe\handler\InGamePacketHandler->handleUseItemTransaction(object pocketmine\network\mcpe\protocol\types\inventory\UseItemTransactionData#279991)
7 pmsrc/vendor/nethergamesmc/bedrock-protocol/src/InventoryTransactionPacket(94): pocketmine\network\mcpe\handler\InGamePacketHandler->handleInventoryTransaction(object pocketmine\network\mcpe\protocol\InventoryTransactionPacket#178777)
8 pmsrc/src/network/mcpe/NetworkSession(511): pocketmine\network\mcpe\protocol\InventoryTransactionPacket->handle(object pocketmine\network\mcpe\handler\InGamePacketHandler#101086)
9 pmsrc/src/network/mcpe/NetworkSession(454): pocketmine\network\mcpe\NetworkSession->handleDataPacket(object pocketmine\network\mcpe\protocol\InventoryTransactionPacket#178777, string[39] .......Y.....l...r=.B.7.....?...>..@?.5)
10 pmsrc/src/network/mcpe/raklib/RakLibInterface(217): pocketmine\network\mcpe\NetworkSession->handleEncoded(string[58] c.a.&..".......rF..`.b..,t..v..~s.#.2...ov.108..0.R.&a.Q..)
11 pmsrc/vendor/pocketmine/raklib-ipc/src/RakLibToUserThreadMessageReceiver(40): pocketmine\network\mcpe\raklib\RakLibInterface->onPacketReceive(int 20, string[67] .5..q....u.C..9.5.52.....U.Y.lw.;..W....",..[.@.......-$MF`F.......)
12 pmsrc/src/network/mcpe/raklib/RakLibInterface(109): raklib\server\ipc\RakLibToUserThreadMessageReceiver->handle(object pocketmine\network\mcpe\raklib\RakLibInterface#190839)
13 pmsrc/vendor/pocketmine/snooze/src/SleeperHandler(120): pocketmine\network\mcpe\raklib\RakLibInterface->pocketmine\network\mcpe\raklib{closure}()
14 pmsrc/src/TimeTrackingSleeperHandler(58): pocketmine\snooze\SleeperHandler->processNotifications()
15 pmsrc/vendor/pocketmine/snooze/src/SleeperHandler(79): pocketmine\TimeTrackingSleeperHandler->processNotifications()
16 pmsrc/src/Server(1687): pocketmine\snooze\SleeperHandler->sleepUntil(float 1687671516.4359)
17 pmsrc/src/Server(1075): pocketmine\Server->tickProcessor()
18 pmsrc/src/PocketMine(334): pocketmine\Server->__construct(object pocketmine\thread\ThreadSafeClassLoader#4, object pocketmine\utils\MainLogger#5, string[11] /root/test/, string[19] /root/test/plugins/)
19 pmsrc/src/PocketMine(357): pocketmine\server()
Code: [541] [542] @throws \DaveRandom\CallbackValidator\InvalidCallbackException [543] @throws \TypeError [544] / [545] public static function validateCallableSignature(callable|CallbackType $signature, callable $subject) : void{ [546] if(!($signature instanceof CallbackType)){ [547] $signature = CallbackType::createFromCallable($signature); [548] } [549] if(!$signature->isSatisfiedBy($subject)){ [550] throw new \TypeError("Declaration of callable
" . CallbackType::createFromCallable($subject) . "
must be compatible with" . $signature . "
"); [551] } [552] } [553] [554] /* [555] @phpstan-template TMemberType [556] @phpstan-param array<mixed, TMemberType> $array [557] @phpstan-param \Closure(TMemberType) : void $validator [558] */ [559] public static function validateArrayValueType(array $array, \Closure $validator) : void{ [560] foreach($array as $k => $v){Additional comments (optional)