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

Submitted by PocketMine-MP 3.11.3

General information

Version: 3.11.3
Git commit: 0d5704b1
Plugin involvement: Direct
Report date: 2020-01-14 20:40:42 +0000 UTC

System Information

PHP version: 7.3.13
Operating system: linux
System banner: Linux ubuntu 4.15.0-74-generic #84-Ubuntu SMP Thu Dec 19 08:06:28 UTC 2019 x86_64

Error information

Warning: the EconomyAPI plugin was directly involved in this crash. Please contact the plugin author.
Message: Call to a member function query() on null
File: plugins/EconomyAPI_pr-10.phar/src/onebone/economyapi/provider/MySQLProvider
Line: #122
Error level: Error
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
	 * @param string $player
* @return float|bool
*/
public function getMoney($player){
if($player instanceof Player){
$player = $player->getName();
}
$player = strtolower($player);

$res = $this->db->query("SELECT money FROM user_money WHERE username='".$this->db->real_escape_string($player)."'");
$ret = $res->fetch_array()[0] ?? false;
$res->free();
return $ret;
}

/**
* @param \pocketmine\Player|string $player
* @param float $amount
* @return bool
*/
#0 plugins/EconomyAPI_pr-10.phar/src/onebone/economyapi/EconomyAPI(170): onebone\economyapi\provider\MySQLProvider->getMoney(string[8] pitekaco)
#1 /home/server/server_full/pmmp/plugin_data/ScoreHud/addons/EconomyApiAddon(31): onebone\economyapi\EconomyAPI->myMoney(object pocketmine\Player)
#2 plugins/ScoreHud.phar/src/JackMD/ScoreHud/ScoreHud(229): JackMD\ScoreHud\Addons\EconomyApiAddon->getProcessedTags(object pocketmine\Player)
#3 plugins/ScoreHud.phar/src/JackMD/ScoreHud/ScoreHud(264): JackMD\ScoreHud\ScoreHud->process(object pocketmine\Player, string[19] ..3[{rank}] {name})
#4 plugins/ScoreHud.phar/src/JackMD/ScoreHud/ScoreHud(208): JackMD\ScoreHud\ScoreHud->displayDefaultScoreboard(object pocketmine\Player)
#5 plugins/ScoreHud.phar/src/JackMD/ScoreHud/ScoreHud(171): JackMD\ScoreHud\ScoreHud->updateScore(object pocketmine\Player)
#6 plugins/ScoreHud.phar/src/JackMD/ScoreHud/task/ScoreUpdateTask(77): JackMD\ScoreHud\ScoreHud->addScore(object pocketmine\Player, string[17] ..l..cKey..bCraft)
#7 src/pocketmine/scheduler/TaskHandler(159): JackMD\ScoreHud\task\ScoreUpdateTask->onRun(integer 5401)
#8 src/pocketmine/scheduler/TaskScheduler(199): pocketmine\scheduler\TaskHandler->run(integer 5401)
#9 src/pocketmine/plugin/PluginManager(682): pocketmine\scheduler\TaskScheduler->mainThreadHeartbeat(integer 5401)
#10 src/pocketmine/Server(2570): pocketmine\plugin\PluginManager->tickSchedulers(integer 5401)
#11 src/pocketmine/Server(2346): pocketmine\Server->tick()
#12 src/pocketmine/Server(2203): pocketmine\Server->tickProcessor()
#13 src/pocketmine/Server(1785): pocketmine\Server->start()
#14 src/pocketmine/PocketMine(268): pocketmine\Server->__construct(object BaseClassLoader, object pocketmine\utils\MainLogger, string[30] /home/server/server_full/pmmp/, string[38] /home/server/server_full/pmmp/plugins/)
#15 src/pocketmine/PocketMine(291): pocketmine\server()
#16 (1): require(string[85] phar:///home/server/server_full/pmmp/PocketMine-MP.phar/src/pocketmine/PocketMin)

Loaded Plugins

  • Show

Server Settings

  • Show