PiggyArchive/PiggyAuth

Crashes when registering email

Closed this issue · 1 comments

DO NOT REMOVE THIS

Please make sure your issue complies with these guidelines:

    • Be using PMMP
    • Make sure the issue hasn't already been reported
    • Make sure you are on the latest version of PMMP & PiggyAuth
    • Have a detailed title like "Players are being kicked randomly"
    • Provide any crash dumps or errors

General

the server crashes when registering email

Server Software:

tesseract

Version of PiggyAuth:

latest

Data Provider:

  • YAML

Steps to Reproduce the Issue

Extra Information

my crashdump

Tesseract Crash Dump Wed Apr 26 04:29:16 ACT 2017

Error: Using $this when not in object context
File: /PiggyAuth-master/src/PiggyAuth/EventListener
Line: 182
Type: notice

THIS CRASH WAS CAUSED BY A PLUGIN
BAD PLUGIN : PiggyAuth v3.0.0.17

Code:
[173] $function = function ($result, $args, $plugin) {
[174] $player = $plugin->getServer()->getPlayerExact($args[0]);
[175] $message = $args[1];
[176] if ($player instanceof Player) {
[177] if ($result !== true) {
[178] $player->sendMessage($plugin->languagemanager->getMessage($player, "invalid-email"));
[179] $plugin->getServer()->getPluginManager()->callEvent(new PlayerFailEvent($plugin, $player, Main::LOGIN, Main::INVALID_EMAIL));
[180] } else {
[181] $plugin->register($player, $plugin->sessionmanager->getSession($player)->getSecondPassword(), $plugin->sessionmanager->getSession($player)->getSecondPassword(), $message);
[182] $this->plugin->sessionmanager->getSession($player)->setSecondPassword(null);
[183] $this->plugin->sessionmanager->getSession($player)->setGivingEmail(false);
[184] }
[185] }
[186] };
[187] $arguements = array($player->getName(), $message);
[188] $this->plugin->emailmanager->validateEmail($message, $function, $arguements);
[189] $event->setCancelled();
[190] }
[191] }
[192] }

Backtrace:
#0 /src/pocketmine/scheduler/AsyncPool(151): PiggyAuth\Tasks\ValidateEmailTask->onCompletion(pocketmine\Server object)
#1 /src/pocketmine/scheduler/ServerScheduler(252): pocketmine\scheduler\AsyncPool->collectTasks(boolean)
#2 /src/pocketmine/Server(2665): pocketmine\scheduler\ServerScheduler->mainThreadHeartbeat(integer 3165)
#3 /src/pocketmine/Server(2389): pocketmine\Server->tick(boolean)
#4 /src/pocketmine/Server(2299): pocketmine\Server->tickProcessor(boolean)
#5 /src/pocketmine/Server(1860): pocketmine\Server->start(boolean)
#6 /src/pocketmine/PocketMine(468): pocketmine\Server->__construct(BaseClassLoader object, pocketmine\utils\MainLogger object, string phar:///root/faction/PocketMine-MP.phar/, string /root/faction/, string /root/faction/plugins/, string unknown)
#7 (1): require_once(string phar:///root/faction/PocketMine-MP.phar/src/pocketmine/PocketMine.php)

Tesseract version: 0000000000000000000000000000000000000000 [Protocol 107; API 3.0.1]
uname -a: Linux web 2.6.32-042stab113.21 #1 SMP Wed Mar 23 11:05:25 MSK 2016 x86_64
PHP version: 7.0.3
Zend version: 3.0.0
OS : Linux, linux

Server uptime: 2 minutes 56 seconds
Number of loaded worlds: 4
Players online: 2/100

Oops.