Merge commit '097c260db'

# Conflicts:
#	resources/vanilla
#	src/item/enchantment/Enchantment.php
#	src/plugin/PluginDescription.php
#	src/pocketmine/entity/Effect.php
#	src/pocketmine/item/ItemFactory.php
#	src/pocketmine/plugin/PluginManager.php
This commit is contained in:
Dylan K. Taylor 2020-06-14 19:28:05 +01:00
commit d0c8d64b40
4 changed files with 8 additions and 8 deletions

View File

@ -47,6 +47,7 @@ use function is_resource;
use function json_encode;
use function json_last_error_msg;
use function max;
use function mb_strtoupper;
use function mkdir;
use function ob_end_clean;
use function ob_get_contents;
@ -57,7 +58,6 @@ use function phpversion;
use function preg_replace;
use function str_split;
use function strpos;
use function strtoupper;
use function substr;
use function time;
use function zend_version;
@ -172,7 +172,7 @@ class CrashDump{
"depends" => $d->getDepend(),
"softDepends" => $d->getSoftDepend(),
"main" => $d->getMain(),
"load" => strtoupper($d->getOrder()->name()),
"load" => mb_strtoupper($d->getOrder()->name()),
"website" => $d->getWebsite()
];
$this->addLine($d->getName() . " " . $d->getVersion() . " by " . implode(", ", $d->getAuthors()) . " for API(s) " . implode(", ", $d->getCompatibleApis()));

View File

@ -50,6 +50,7 @@ use function is_object;
use function is_resource;
use function is_string;
use function json_encode;
use function mb_strtoupper;
use function min;
use function mkdir;
use function preg_match;
@ -58,7 +59,6 @@ use function round;
use function spl_object_hash;
use function sprintf;
use function strlen;
use function strtoupper;
use function substr;
use const JSON_PRETTY_PRINT;
use const JSON_UNESCAPED_SLASHES;
@ -131,7 +131,7 @@ class MemoryManager{
if($m <= 0){
$defaultMemory = 0;
}else{
switch(strtoupper($matches[2])){
switch(mb_strtoupper($matches[2])){
case "K":
$defaultMemory = $m / 1024;
break;

View File

@ -25,7 +25,7 @@ namespace pocketmine\event;
use function constant;
use function defined;
use function strtoupper;
use function mb_strtoupper;
/**
* List of event priorities
@ -84,7 +84,7 @@ final class EventPriority{
* @throws \InvalidArgumentException
*/
public static function fromString(string $name) : int{
$name = strtoupper($name);
$name = mb_strtoupper($name);
$const = self::class . "::" . $name;
if($name !== "ALL" and defined($const)){
return constant($const);

View File

@ -26,7 +26,7 @@ namespace pocketmine\item\enchantment;
use pocketmine\event\entity\EntityDamageEvent;
use function constant;
use function defined;
use function strtoupper;
use function mb_strtoupper;
/**
* Manages enchantment type data.
@ -233,7 +233,7 @@ class Enchantment{
}
public static function fromString(string $name) : ?Enchantment{
$const = Enchantment::class . "::" . strtoupper($name);
$const = Enchantment::class . "::" . mb_strtoupper($name);
if(defined($const)){
return self::get(constant($const));
}