menu
#4656624 Call to a member function query() on null

Submitted by PocketMine-MP 3.16.0

General information

Version: 3.16.0
Git commit: d2f68836
Plugin involvement: Direct
Report date: 2020-11-21 18:27:16 +0000 UTC

System Information

PHP version: 7.3.14
Operating system: linux
System banner: Linux 7175e85b376e 5.4.0-1018-kvm #18-Ubuntu SMP Thu Jun 25 09:42:57 UTC 2020 x86_64

Error information

Warning: the FactionsPro plugin was directly involved in this crash. Please contact the plugin author.
Message: Call to a member function query() on null
File: plugins/FactionsPro.phar/src/FactionsPro/FactionMain
Line: #149
Error level: Error
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
    }

public function isInFaction($player) {
$result = $this->db->query("SELECT player FROM master WHERE player='$player';");
$array = $result->fetchArray(SQLITE3_ASSOC);
return empty($array) == false;
}

public function getFaction($player) {
$faction = $this->db->query("SELECT faction FROM master WHERE player='$player';");
$factionArray = $faction->fetchArray(SQLITE3_ASSOC);
return $factionArray["faction"];
}

public function setFactionPower($faction, $power) {
if ($power < 0) {
$power = 0;
}
$stmt = $this->db->prepare("INSERT OR REPLACE INTO strength (faction, power) VALUES (:faction, :power);");
$stmt->bindValue(":faction", $faction);
#0 plugins/MCPEToDiscord.phar/src/Jack/DiscordMCPE/Main(251): FactionsPro\FactionMain->getFaction(string[12] Megentaboi64)
#1 src/pocketmine/plugin/MethodEventExecutor(42): Jack\DiscordMCPE\Main->onQuit(object pocketmine\event\player\PlayerQuitEvent)
#2 src/pocketmine/plugin/RegisteredListener(80): pocketmine\plugin\MethodEventExecutor->execute(object Jack\DiscordMCPE\Main, object pocketmine\event\player\PlayerQuitEvent)
#3 src/pocketmine/event/Event(88): pocketmine\plugin\RegisteredListener->callEvent(object pocketmine\event\player\PlayerQuitEvent)
#4 src/pocketmine/Player(3661): pocketmine\event\Event->call()
#5 src/pocketmine/network/mcpe/RakLibInterface(176): pocketmine\Player->close(object pocketmine\lang\TranslationContainer, string[21] Internal server error)
#6 vendor/pocketmine/raklib/src/server/ServerHandler(95): pocketmine\network\mcpe\RakLibInterface->handleEncapsulated(string[18] 98.109.40.42 18001, object raklib\protocol\EncapsulatedPacket, integer 0)
#7 src/pocketmine/network/mcpe/RakLibInterface(109): raklib\server\ServerHandler->handlePacket()
#8 src/pocketmine/network/mcpe/RakLibInterface(99): pocketmine\network\mcpe\RakLibInterface->process()
#9 vendor/pocketmine/snooze/src/SleeperHandler(123): pocketmine\network\mcpe\RakLibInterface->pocketmine\network\mcpe\{closure}()
#10 vendor/pocketmine/snooze/src/SleeperHandler(85): pocketmine\snooze\SleeperHandler->processNotifications()
#11 src/pocketmine/Server(2157): pocketmine\snooze\SleeperHandler->sleepUntil(double 1605983236.0753)
#12 src/pocketmine/Server(1994): pocketmine\Server->tickProcessor()
#13 src/pocketmine/Server(1588): pocketmine\Server->start()
#14 src/pocketmine/PocketMine(273): pocketmine\Server->__construct(object BaseClassLoader, object pocketmine\utils\MainLogger, string[8] /server/, string[16] /server/plugins/)
#15 src/pocketmine/PocketMine(304): pocketmine\server()
#16 (11): require(string[56] phar:///server/server.phar/src/pocketmine/PocketMine.php)

Loaded Plugins

  • Show

Server Settings

  • Show