menu
#4219666 Use of undefined constant JSON_THROW_ON_ERROR - assumed 'JSON_THROW_ON_ERROR' (this will throw an Error in a future version of PHP)

Submitted by PocketMine-MP 3.12.2

General information

Version: 3.12.2
Git commit: 9b6b3f50
Plugin involvement: Direct
Report date: 2020-05-23 01:23:29 +0000 UTC

System Information

PHP version: 7.2.19
Operating system: win
System banner: Windows NT DESKTOP-GVT0MIP 10.0 build 18363 (Windows 10) AMD64

Error information

Warning: the MultiServerCounter plugin was directly involved in this crash. Please contact the plugin author.
Message: Use of undefined constant JSON_THROW_ON_ERROR - assumed 'JSON_THROW_ON_ERROR' (this will throw an Error in a future version of PHP)
File: plugins/MultiServerCounter.phar/src/luca28pet/MultiServerCounter/UpdatePlayersTask
Line: #19
Error level: ErrorException
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
use function json_decode;
use function json_encode;

class UpdatePlayersTask extends AsyncTask{

/** @var string */
private $serversData;

public function __construct(array $serversConfig){
$this->serversData = json_encode($serversConfig, JSON_THROW_ON_ERROR);
}

public function onRun() : void{
$res = ['count' => 0, 'maxPlayers' => 0, 'errors' => []];
$serversConfig = json_decode($this->serversData, true, 512, JSON_THROW_ON_ERROR);
foreach($serversConfig as $serverConfigString){
$serverData = explode(':', $serverConfigString);
$ip = $serverData[0];
$port = (int) $serverData[1];
try{
#0 plugins/MultiServerCounter.phar/src/luca28pet/MultiServerCounter/UpdatePlayersTask(19): pocketmine\utils\Utils::errorExceptionHandler(integer 2, string[131] Use of undefined constant JSON_THROW_ON_ERROR - assumed 'JSON_THROW_ON_ERROR' (t, string[137] phar://C:/Users/lina/Desktop/PM-Server [IpodCraft]/plugins/MultiServerCounter.ph, integer 19, array[1])
#1 plugins/MultiServerCounter.phar/src/luca28pet/MultiServerCounter/ScheduleUpdateTask(17): luca28pet\MultiServerCounter\UpdatePlayersTask->__construct(array[2])
#2 src/pocketmine/scheduler/TaskHandler(134): luca28pet\MultiServerCounter\ScheduleUpdateTask->onRun(integer 1)
#3 src/pocketmine/scheduler/TaskScheduler(176): pocketmine\scheduler\TaskHandler->run(integer 1)
#4 src/pocketmine/plugin/PluginManager(643): pocketmine\scheduler\TaskScheduler->mainThreadHeartbeat(integer 1)
#5 src/pocketmine/Server(2380): pocketmine\plugin\PluginManager->tickSchedulers(integer 1)
#6 src/pocketmine/Server(2143): pocketmine\Server->tick()
#7 src/pocketmine/Server(1990): pocketmine\Server->tickProcessor()
#8 src/pocketmine/Server(1584): pocketmine\Server->start()
#9 src/pocketmine/PocketMine(272): pocketmine\Server->__construct(object BaseClassLoader, object pocketmine\utils\MainLogger, string[44] C:\Users\lina\Desktop\PM-Server [IpodCraft]\, string[52] C:\Users\lina\Desktop\PM-Server [IpodCraft]\plugins\)
#10 src/pocketmine/PocketMine(295): pocketmine\server()
#11 (11): require(string[99] phar://C:/Users/lina/Desktop/PM-Server [IpodCraft]/PocketMine-MP.phar/src/pocket)

Loaded Plugins

  • Show

Server Settings

  • Show