menu
#7305527 HCF\faction\Faction::getLeader(): Argument #1 ($factionName) must be of type string, null given, called in phar:///root/pocketmine/plugins/HardCoreFactions_v1.0.0.phar/src/HCF/listener/type/faction/FactionListener.php on line 410

Submitted by PocketMine-MP 4.6.1

General information

Version: 4.6.1
Git commit: b20e0453
Plugin involvement: Direct
Report date: 2022-08-06 04:19:13 +0000 UTC
Server uptime: 0 days 4 hours 0 minutes 41 seconds

System Information

PHP version: 8.0.19
Operating system: linux
System banner: Linux ubuntu-s-2vcpu-4gb-intel-nyc1-01 5.4.0-122-generic #138-Ubuntu SMP Wed Jun 22 15:00:31 UTC 2022 x86_64

Error information

Warning: the HardCoreFactions plugin was directly involved in this crash. Please contact the plugin author.
Message: HCF\faction\Faction::getLeader(): Argument #1 ($factionName) must be of type string, null given, called in phar:///root/pocketmine/plugins/HardCoreFactions_v1.0.0.phar/src/HCF/listener/type/faction/FactionListener.php on line 410
File: plugins/HardCoreFactions_v1.0.0.phar/src/HCF/faction/Faction
Line: #109
Error level: TypeError
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
        $result = $query->fetchArray(SQLITE3_ASSOC);
$query->finalize();
return !empty($result);
}

/**
* @param string $factionName
* @return string
*/
public static function getLeader(string $factionName) : string {
$factionRank = FactionRank::LEADER;
$query = SQLite3Provider::getInstance()->sqlite()->query("SELECT * FROM factions WHERE faction_name = '$factionName' AND faction_rank = '$factionRank';");
$result = $query->fetchArray(SQLITE3_ASSOC);
$query->finalize();
return !empty($result) ? $result["player_name"] : throw new \RuntimeException("There don't have leader in the '$factionName', please solve this error ..");
}

/**
* @param string $factionName
* @return string|null
#0 plugins/HardCoreFactions_v1.0.0.phar/src/HCF/listener/type/faction/FactionListener(410): HCF\faction\Faction::getLeader(null)
#1 plugins/HardCoreFactions_v1.0.0.phar/src/HCF/listener/type/faction/FactionListener(319): HCF\listener\type\faction\FactionListener->subclaim(object HCF\player\Player#160947, object pocketmine\block\Chest#212464)
#2 pmsrc/src/event/RegisteredListener(60): HCF\listener\type\faction\FactionListener->onPlayerInteractEvent(object pocketmine\event\player\PlayerInteractEvent#220334)
#3 pmsrc/src/event/Event(62): pocketmine\event\RegisteredListener->callEvent(object pocketmine\event\player\PlayerInteractEvent#220334)
#4 pmsrc/src/world/World(1792): pocketmine\event\Event->call()
#5 plugins/HardCoreFactions_v1.0.0.phar/src/HCF/player/Player(1243): pocketmine\world\World->useItemOn(object pocketmine\math\Vector3#154470, object pocketmine\item\Axe#167400, int 2, object pocketmine\math\Vector3#184671, object HCF\player\Player#160947, true)
#6 pmsrc/src/network/mcpe/handler/InGamePacketHandler(440): HCF\player\Player->interactBlock(object pocketmine\math\Vector3#154470, int 2, object pocketmine\math\Vector3#184671)
#7 pmsrc/src/network/mcpe/handler/InGamePacketHandler(298): pocketmine\network\mcpe\handler\InGamePacketHandler->handleUseItemTransaction(object pocketmine\network\mcpe\protocol\types\inventory\UseItemTransactionData#172035)
#8 pmsrc/vendor/pocketmine/bedrock-protocol/src/InventoryTransactionPacket(105): pocketmine\network\mcpe\handler\InGamePacketHandler->handleInventoryTransaction(object pocketmine\network\mcpe\protocol\InventoryTransactionPacket#205161)
#9 pmsrc/src/network/mcpe/NetworkSession(394): pocketmine\network\mcpe\protocol\InventoryTransactionPacket->handle(object pocketmine\network\mcpe\handler\InGamePacketHandler#221800)
#10 pmsrc/src/network/mcpe/NetworkSession(357): pocketmine\network\mcpe\NetworkSession->handleDataPacket(object pocketmine\network\mcpe\protocol\InventoryTransactionPacket#205161, string[176] .....9F........8.............Damage8......display...Name....r..6Xtreme..r..7 Axe)
#11 pmsrc/src/network/mcpe/raklib/RakLibInterface(182): pocketmine\network\mcpe\NetworkSession->handleEncoded(string[211] .SY.......7....0.........."..X..,......g.b``fcpI.MLO..1p.3.d...$Vr.0.%...1.Z^th.)
#12 pmsrc/vendor/pocketmine/raklib-ipc/src/RakLibToUserThreadMessageReceiver(42): pocketmine\network\mcpe\raklib\RakLibInterface->onPacketReceive(int 50, string[220] .....<}P...E.'[email protected])..'tr...+x.....7.'..aJ.=R.....P....)
#13 pmsrc/src/network/mcpe/raklib/RakLibInterface(112): raklib\server\ipc\RakLibToUserThreadMessageReceiver->handle(object pocketmine\network\mcpe\raklib\RakLibInterface#33918)
#14 pmsrc/vendor/pocketmine/snooze/src/SleeperHandler(123): pocketmine\network\mcpe\raklib\RakLibInterface->pocketmine\network\mcpe\raklib\{closure}()
#15 pmsrc/vendor/pocketmine/snooze/src/SleeperHandler(82): pocketmine\snooze\SleeperHandler->processNotifications()
#16 pmsrc/src/Server(1703): pocketmine\snooze\SleeperHandler->sleepUntil(float 1659759553.0503)
#17 pmsrc/src/Server(1063): pocketmine\Server->tickProcessor()
#18 pmsrc/src/PocketMine(304): pocketmine\Server->__construct(object BaseClassLoader#3, object pocketmine\utils\MainLogger#2, string[17] /root/pocketmine/, string[25] /root/pocketmine/plugins/)
#19 pmsrc/src/PocketMine(327): pocketmine\server()
#20 pmsrc(11): require(string[61] phar:///root/pocketmine/PocketMine-MP.phar/src/PocketMine.php)

Loaded Plugins

  • Show

Server Settings

  • Show

Installed PHP Extensions

  • Show