menu
#2470727 Undefined offset: 1

Submitted by PocketMine-MP 3.8.2

General information

Version: 3.8.2
Git commit: 5c81da9b
Plugin involvement: Direct
Report date: 2019-06-12 13:25:59 +0000 UTC

System Information

PHP version: 7.2.16
Operating system: win
System banner: Windows NT DESKTOP-QFD1JMA 10.0 build 17763 (Windows 10) AMD64

Error information

Warning: the ServerCore plugin was directly involved in this crash. Please contact the plugin author.
Message: Undefined offset: 1
File: plugins/ServerCore/src/Mastercoding/ServerCore/friend/FriendPlayer
Line: #119
Error level: ErrorException
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
                return false;
} else {
return $result->fetch_assoc();
}
}, function ($result, string $string) {
if ($result !== false) {
$array = explode(":", $string);
$friends = explode(":", $result["list"]);
array_pop($friends);
unset($friends[array_search($array[1], $friends)]);
$friend = implode(":", $friends);
if (count($friends) > 0) {
$friend .= ":";
}
$player = Server::getInstance()->getPlayerExact($array[0]);
if ($player !== null){
$friendPlayer = Friend::$players[$player->getName()];
unset($friendPlayer->friends[array_search($array[1], $friendPlayer->getFriends())]);
}
Server::getInstance()->getAsyncPool()->submitTask(new MysqlTask("UPDATE friend SET list = '$friend' WHERE playername = '$array[0]'"));
#0 plugins/ServerCore/src/Mastercoding/ServerCore/friend/FriendPlayer(119): pocketmine\utils\Utils::errorExceptionHandler(integer 8, string Undefined offset: 1, string C:\Users\Mastercoding\Desktop\Test\plugins\ServerCore\src\Mastercoding\ServerCore\friend\FriendPlayer.php, integer 119, array Array())
#1 plugins/ServerCore/src/Mastercoding/ServerCore/task/MysqlTask(43): Mastercoding\ServerCore\task\MysqlTask::Mastercoding\ServerCore\friend\{closure}(array Array(), string )
#2 src/pocketmine/scheduler/AsyncPool(319): Mastercoding\ServerCore\task\MysqlTask->onCompletion(pocketmine\Server object)
#3 src/pocketmine/Server(2562): pocketmine\scheduler\AsyncPool->collectTasks()
#4 src/pocketmine/Server(2334): pocketmine\Server->tick()
#5 src/pocketmine/Server(2195): pocketmine\Server->tickProcessor()
#6 src/pocketmine/Server(1774): pocketmine\Server->start()
#7 src/pocketmine/PocketMine(266): pocketmine\Server->__construct(BaseClassLoader object, pocketmine\utils\MainLogger object, string C:\Users\Mastercoding\Desktop\Test\, string C:\Users\Mastercoding\Desktop\Test\plugins\)
#8 (1): require(string phar://C:/Users/Mastercoding/Desktop/Test/PocketMine-MP.phar/src/pocketmine/PocketMine.php)

Loaded Plugins

  • Show

Server Settings

  • Show