menu
#9718572 Declaration of callable `function ( $pos ) : void` must be compatible with `function ( )`

Submitted by PocketMine-MP 5.8.2

General information

Version: 5.8.2
Git commit: c3c81b09
Plugin involvement: Indirect
Report date: 2023-12-03 04:40:18 +0000 UTC
Server uptime: 0 days 0 hours 0 minutes 45 seconds

System Information

PHP version: 8.1.26
JIT status: Not available
Operating system: linux
System banner: Linux 49ec092b-7a95-41ff-81d8-3dc85617f43c 5.15.0-46-generic #49-Ubuntu SMP Thu Aug 4 18:03:25 UTC 2022 x86_64

Error information

Warning: the HCF plugin was indirectly involved in this crash. This may be a false positive. Please contact the plugin author before opening a bug ticket.
Thread: Main
Message: Declaration of callable `function ( $pos ) : void` must be compatible with `function ( )`
File: pmsrc/src/utils/Utils
Line: #575
Type: TypeError
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
	 *
* @throws \DaveRandom\CallbackValidator\InvalidCallbackException
* @throws \TypeError
*/
public static function validateCallableSignature(callable|CallbackType $signature, callable $subject) : void{
if(!($signature instanceof CallbackType)){
$signature = CallbackType::createFromCallable($signature);
}
if(!$signature->isSatisfiedBy($subject)){
throw new \TypeError("Declaration of callable `" . CallbackType::createFromCallable($subject) . "` must be compatible with `" . $signature . "`");
}
}

/**
* @phpstan-template TMemberType
* @phpstan-param array<mixed, TMemberType> $array
* @phpstan-param \Closure(TMemberType) : void $validator
*/
public static function validateArrayValueType(array $array, \Closure $validator) : void{
foreach($array as $k => $v){
#0 pmsrc/src/scheduler/ClosureTask(49): pocketmine\utils\Utils::validateCallableSignature(object DaveRandom\CallbackValidator\CallbackType#80384, object Closure#177913)
#1 plugins/HCF/src/HCF/kit/KitListener(78): pocketmine\scheduler\ClosureTask->__construct(object Closure#177913)
#2 pmsrc/src/event/RegisteredListener(61): HCF\kit\KitListener->handlePlaceBlock(object pocketmine\event\block\BlockPlaceEvent#177162)
#3 pmsrc/src/event/Event(63): pocketmine\event\RegisteredListener->callEvent(object pocketmine\event\block\BlockPlaceEvent#177162)
#4 pmsrc/src/world/World(2218): pocketmine\event\Event->call()
#5 pmsrc/src/player/Player(1816): pocketmine\world\World->useItemOn(object pocketmine\math\Vector3#177768, object pocketmine\item\ItemBlock#82350, int 1, object pocketmine\math\Vector3#98279, object HCF\player\Player#94019, true, array[0])
#6 pmsrc/src/network/mcpe/handler/InGamePacketHandler(490): pocketmine\player\Player->interactBlock(object pocketmine\math\Vector3#177768, int 1, object pocketmine\math\Vector3#94295)
#7 pmsrc/src/network/mcpe/handler/InGamePacketHandler(343): pocketmine\network\mcpe\handler\InGamePacketHandler->handleUseItemTransaction(object pocketmine\network\mcpe\protocol\types\inventory\UseItemTransactionData#95240)
#8 pmsrc/vendor/pocketmine/bedrock-protocol/src/InventoryTransactionPacket(94): pocketmine\network\mcpe\handler\InGamePacketHandler->handleInventoryTransaction(object pocketmine\network\mcpe\protocol\InventoryTransactionPacket#177181)
#9 pmsrc/src/network/mcpe/NetworkSession(445): pocketmine\network\mcpe\protocol\InventoryTransactionPacket->handle(object pocketmine\network\mcpe\handler\InGamePacketHandler#96265)
#10 pmsrc/src/network/mcpe/NetworkSession(383): pocketmine\network\mcpe\NetworkSession->handleDataPacket(object pocketmine\network\mcpe\protocol\InventoryTransactionPacket#177181, string[55] [email protected]=.B.h\B`..?...?..^=.X)
#11 pmsrc/src/network/mcpe/raklib/RakLibInterface(219): pocketmine\network\mcpe\NetworkSession->handleEncoded(string[77] .R..Pt)Rt-bb.a.4.c`b`..0..8000........".....:...qJ.#o...`.0'..|.X.#P.?fB.....)
#12 pmsrc/vendor/pocketmine/raklib-ipc/src/RakLibToUserThreadMessageReceiver(40): pocketmine\network\mcpe\raklib\RakLibInterface->onPacketReceive(int 0, string[86] ...9...'=y..b.m....-.......$._......ko...o.-S..ahcvt..Y.fj|.}i....|.x ..-....'..)
#13 pmsrc/src/network/mcpe/raklib/RakLibInterface(111): raklib\server\ipc\RakLibToUserThreadMessageReceiver->handle(object pocketmine\network\mcpe\raklib\RakLibInterface#187705)
#14 pmsrc/vendor/pocketmine/snooze/src/SleeperHandler(120): pocketmine\network\mcpe\raklib\RakLibInterface->pocketmine\network\mcpe\raklib\{closure}()
#15 pmsrc/src/TimeTrackingSleeperHandler(58): pocketmine\snooze\SleeperHandler->processNotifications()
#16 pmsrc/vendor/pocketmine/snooze/src/SleeperHandler(79): pocketmine\TimeTrackingSleeperHandler->processNotifications()
#17 pmsrc/src/Server(1683): pocketmine\snooze\SleeperHandler->sleepUntil(float 1701578418.501)
#18 pmsrc/src/Server(1065): pocketmine\Server->tickProcessor()
#19 pmsrc/src/PocketMine(341): pocketmine\Server->__construct(object pocketmine\thread\ThreadSafeClassLoader#6, object pocketmine\utils\MainLogger#3, string[16] /home/container/, string[24] /home/container/plugins/)
#20 pmsrc/src/PocketMine(364): pocketmine\server()
#21 pmsrc(11): require(string[60] phar:///home/container/PocketMine-MP.phar/src/PocketMine.php)

Loaded Plugins

  • Show

Server Settings

  • Show

Installed Composer Dependencies

Installed PHP Extensions

  • Show