menu
#6718987 foreach() argument must be of type array|object, int given

Submitted by PocketMine-MP 4.3.1

General information

Version: 4.3.1
Git commit: f7dce4af
Plugin involvement: Direct
Report date: 2022-05-14 07:54:02 +0000 UTC
Server uptime: 0 days 0 hours 5 minutes 49 seconds

System Information

PHP version: 8.0.16
Operating system: linux
System banner: Linux ns556432 4.15.0-171-generic #180-Ubuntu SMP Wed Mar 2 17:25:05 UTC 2022 x86_64

Error information

Warning: the Factions plugin was directly involved in this crash. Please contact the plugin author.
Message: foreach() argument must be of type array|object, int given
File: plugins/Factions_v1.phar/src/Ali/Factions/faction/FactionRelations
Line: #59
Error level: ErrorException
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
		unset($this->relations[$faction]);
}

public function deleteRelations(string $faction): void{
$this->provider->deleteRelations($faction);
$relations = $this->relations[$faction] ?? [];

var_dump($relations);
foreach($relations as $value){
foreach($value as $key => $v){
unset($this->relations[$key][$faction]);
}
}

unset($this->relations[$faction]);
}

}
#0 plugins/Factions_v1.phar/src/Ali/Factions/faction/FactionRelations(59): pocketmine\errorhandler\ErrorToExceptionHandler::handle(integer 2, string[58] foreach() argument must be of type array|object, int given, string[100] phar:///root/HardCoreFactions/plugins/Factions_v1.phar/src/Ali/Factions/faction/, integer 59)
#1 plugins/Factions_v1.phar/src/Ali/Factions/faction/FactionsFactory(76): Ali\Factions\faction\FactionRelations->deleteRelations(string[36] 1ecd1603-3b14-672c-b768-00ff82f044b1)
#2 plugins/Factions_v1.phar/src/Ali/Factions/commands/faction/Delete(48): Ali\Factions\faction\FactionsFactory->deleteFaction(object Ali\Factions\faction\Faction#128326)
#3 plugins/NetworkCore_v1.1.phar/src/Ali/NetworkCore/utils/data/DataTrait(21): Ali\Factions\commands\faction\Delete->Ali\Factions\commands\faction\{closure}(object Ali\Factions\member\OnlineMember#116647)
#4 plugins/Factions_v1.phar/src/Ali/Factions/commands/faction/Delete(49): Ali\Factions\member\BaseMember->run(object Closure#147239)
#5 plugins/Commando_v3.0.0.phar/src/CortexPE/Commando/BaseCommand(123): Ali\Factions\commands\faction\Delete->onRun(object pocketmine\player\Player#115196, string[7] disband, array[0])
#6 plugins/Commando_v3.0.0.phar/src/CortexPE/Commando/BaseCommand(107): CortexPE\Commando\BaseCommand->execute(object pocketmine\player\Player#115196, string[7] disband, array[0])
#7 pmsrc/src/command/SimpleCommandMap(220): CortexPE\Commando\BaseCommand->execute(object pocketmine\player\Player#115196, string[1] f, array[0])
#8 pmsrc/src/Server(1409): pocketmine\command\SimpleCommandMap->dispatch(object pocketmine\player\Player#115196, string[9] f disband)
#9 pmsrc/src/player/Player(1402): pocketmine\Server->dispatchCommand(object pocketmine\player\Player#115196, string[9] f disband)
#10 pmsrc/src/network/mcpe/handler/InGamePacketHandler(754): pocketmine\player\Player->chat(string[10] /f disband)
#11 pmsrc/vendor/pocketmine/bedrock-protocol/src/CommandRequestPacket(51): pocketmine\network\mcpe\handler\InGamePacketHandler->handleCommandRequest(object pocketmine\network\mcpe\protocol\CommandRequestPacket#147152)
#12 pmsrc/src/network/mcpe/NetworkSession(398): pocketmine\network\mcpe\protocol\CommandRequestPacket->handle(object pocketmine\network\mcpe\handler\InGamePacketHandler#128186)
#13 pmsrc/src/network/mcpe/NetworkSession(361): pocketmine\network\mcpe\NetworkSession->handleDataPacket(object pocketmine\network\mcpe\protocol\CommandRequestPacket#147152, string[31] M./f disband..G.2.B.&yN[...q...)
#14 pmsrc/src/network/mcpe/raklib/RakLibInterface(192): pocketmine\network\mcpe\NetworkSession->handleEncoded(string[78] ....OSH.,NJ.Ka...h4.i.Z._..w......'02.>..0.h...<.E.....-wf....F........z......)
#15 pmsrc/vendor/pocketmine/raklib-ipc/src/RakLibToUserThreadMessageReceiver(42): pocketmine\network\mcpe\raklib\RakLibInterface->onPacketReceive(integer 1, string[87] .xuZK. ..o_..1..&....f.MH............0.t..R#........^......E?..0.6l...i.!..N.3\.)
#16 pmsrc/src/network/mcpe/raklib/RakLibInterface(122): raklib\server\ipc\RakLibToUserThreadMessageReceiver->handle(object pocketmine\network\mcpe\raklib\RakLibInterface#112673)
#17 pmsrc/vendor/pocketmine/snooze/src/SleeperHandler(123): pocketmine\network\mcpe\raklib\RakLibInterface->pocketmine\network\mcpe\raklib\{closure}()
#18 pmsrc/vendor/pocketmine/snooze/src/SleeperHandler(82): pocketmine\snooze\SleeperHandler->processNotifications()
#19 pmsrc/src/Server(1661): pocketmine\snooze\SleeperHandler->sleepUntil(double 1652514842.0788)
#20 pmsrc/src/Server(1047): pocketmine\Server->tickProcessor()
#21 pmsrc/src/PocketMine(304): pocketmine\Server->__construct(object BaseClassLoader#3, object pocketmine\utils\MainLogger#2, string[23] /root/HardCoreFactions/, string[31] /root/HardCoreFactions/plugins/)
#22 pmsrc/src/PocketMine(327): pocketmine\server()
#23 pmsrc(11): require(string[67] phar:///root/HardCoreFactions/PocketMine-MP.phar/src/PocketMine.php)

Loaded Plugins

  • Show

Server Settings

  • Show

Installed PHP Extensions

  • Show