critical() public method

public critical ( $message, $name = "CRITICAL" )
Ejemplo n.º 1
0
             foreach ($args as $name => $value) {
                 $params .= (\is_object($value) ? \get_class($value) . " " . (\method_exists($value, "__toString") ? $value->__toString() : "object") : \gettype($value) . " " . (\is_array($value) ? "Array()" : Utils::printable(@\strval($value)))) . ", ";
             }
         }
         $messages[] = "#{$j} " . (isset($trace[$i]["file"]) ? cleanPath($trace[$i]["file"]) : "") . "(" . (isset($trace[$i]["line"]) ? $trace[$i]["line"] : "") . "): " . (isset($trace[$i]["class"]) ? $trace[$i]["class"] . (($trace[$i]["type"] === "dynamic" or $trace[$i]["type"] === "->") ? "->" : "::") : "") . $trace[$i]["function"] . "(" . Utils::printable(\substr($params, 0, -2)) . ")";
     }
     return $messages;
 }
 function cleanPath($path)
 {
     return \rtrim(\str_replace(["\\", ".php", "phar://", \rtrim(\str_replace(["\\", "phar://"], ["/", ""], \pocketmine\PATH), "/"), \rtrim(\str_replace(["\\", "phar://"], ["/", ""], \pocketmine\PLUGIN_PATH), "/")], ["/", "", "", "", ""], $path), "/");
 }
 \set_error_handler([\ExceptionHandler::class, "handler"], -1);
 $errors = 0;
 if (\version_compare("5.6.0", PHP_VERSION) > 0) {
     $logger->critical("You must use PHP >= 5.6");
     ++$errors;
 }
 if (\php_sapi_name() !== "cli") {
     $logger->critical("You must run PocketMine-MP using the CLI.");
     ++$errors;
 }
 if (!\extension_loaded("sockets")) {
     $logger->critical("Unable to find the Socket extension.");
     ++$errors;
 }
 $pthreads_version = \phpversion("pthreads");
 if (\substr_count($pthreads_version, ".") < 2) {
     $pthreads_version = "0.{$pthreads_version}";
 }
 if (\version_compare($pthreads_version, "2.0.9") < 0) {
Ejemplo n.º 2
0
             }
             foreach ($args as $name => $value) {
                 $params .= (is_object($value) ? get_class($value) . " " . (method_exists($value, "__toString") ? $value->__toString() : "object") : gettype($value) . " " . (is_array($value) ? "Array()" : Utils::printable(@strval($value)))) . ", ";
             }
         }
         $messages[] = "#{$j} " . (isset($trace[$i]["file"]) ? cleanPath($trace[$i]["file"]) : "") . "(" . (isset($trace[$i]["line"]) ? $trace[$i]["line"] : "") . "): " . (isset($trace[$i]["class"]) ? $trace[$i]["class"] . (($trace[$i]["type"] === "dynamic" or $trace[$i]["type"] === "->") ? "->" : "::") : "") . $trace[$i]["function"] . "(" . Utils::printable(substr($params, 0, -2)) . ")";
     }
     return $messages;
 }
 function cleanPath($path)
 {
     return rtrim(str_replace(["\\", ".php", "phar://", rtrim(str_replace(["\\", "phar://"], ["/", ""], \pocketmine\PATH), "/"), rtrim(str_replace(["\\", "phar://"], ["/", ""], \pocketmine\PLUGIN_PATH), "/")], ["/", "", "", "", ""], $path), "/");
 }
 $errors = 0;
 if (php_sapi_name() !== "cli") {
     $logger->critical("You must run ImagicalMine using the CLI.");
     ++$errors;
 }
 if (!extension_loaded("sockets")) {
     $logger->critical("Unable to find the Socket extension.");
     ++$errors;
 }
 $pthreads_version = phpversion("pthreads");
 if (substr_count($pthreads_version, ".") < 2) {
     $pthreads_version = "0.{$pthreads_version}";
 }
 if (version_compare($pthreads_version, "3.1.5") < 0) {
     $logger->critical("pthreads >= 3.1.5 is required, while you have {$pthreads_version}.");
     ++$errors;
 }
 if (!extension_loaded("uopz")) {