menu
#2907053 Invalid argument supplied for foreach()

Submitted by PocketMine-MP 3.9.3

General information

Version: 3.9.3
Git commit: 18a1bfe4
Plugin involvement: Direct
Report date: 2019-10-09 19:38:14 +0000 UTC

System Information

PHP version: 7.3.8
Operating system: linux
System banner: Linux 71fb678b8f36 4.4.0-164-generic #192-Ubuntu SMP Fri Sep 13 12:02:50 UTC 2019 x86_64

Error information

Warning: the PocketVote plugin was directly involved in this crash. Please contact the plugin author.
Message: Invalid argument supplied for foreach()
File: plugins/PocketVote.phar/src/ProjectInfinity/PocketVote/task/guru/GetLinksTask
Line: #61
Error level: ErrorException
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
            return;
}

if($result->success && (!isset($result->payload) || ($result->success && count($result->payload) === 0))) {
$player->sendMessage(TextFormat::YELLOW.'There are no added links, use '.TextFormat::AQUA.'/guadd [url]'.TextFormat::YELLOW.' to add a link!');
return;
}

$links = [];
foreach($result->payload as $link) {
$links[$link->id] = $link;
}

$selectedId = 0;
$selectedForm = new ModalForm(static function(Player $player, $delete) use(&$selectedId) {
if(!$delete) return;
PocketVote::getPlugin()->getServer()->dispatchCommand($player, 'gudel '.$selectedId);
});

$form = new SimpleForm(static function(Player $player, $id) use($links, $selectedForm, &$selectedId) {
#0 plugins/PocketVote.phar/src/ProjectInfinity/PocketVote/task/guru/GetLinksTask(61): pocketmine\utils\Utils::errorExceptionHandler(integer 2, string[39] Invalid argument supplied for foreach(), string[104] phar:///aternos/server/plugins/PocketVote.phar/src/ProjectInfinity/PocketVote/ta, integer 61, array[4])
#1 src/pocketmine/scheduler/AsyncPool(320): ProjectInfinity\PocketVote\task\guru\GetLinksTask->onCompletion(object pocketmine\Server)
#2 src/pocketmine/Server(2573): pocketmine\scheduler\AsyncPool->collectTasks()
#3 src/pocketmine/Server(2345): pocketmine\Server->tick()
#4 src/pocketmine/Server(2205): pocketmine\Server->tickProcessor()
#5 src/pocketmine/Server(1784): pocketmine\Server->start()
#6 src/pocketmine/PocketMine(275): pocketmine\Server->__construct(object BaseClassLoader, object pocketmine\utils\MainLogger, string[16] /aternos/server/, string[24] /aternos/server/plugins/)
#7 src/pocketmine/PocketMine(299): pocketmine\server()
#8 (1): require(string[64] phar:///aternos/server/server.phar/src/pocketmine/PocketMine.php)

Loaded Plugins

  • Show

Server Settings

  • Show