mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-07 04:17:07 +00:00
Utils: improve how boolean arguments are displayed in stack traces
This commit is contained in:
parent
fadc96bb0e
commit
9702b51bd1
@ -51,6 +51,7 @@ use function getenv;
|
||||
use function gettype;
|
||||
use function implode;
|
||||
use function is_array;
|
||||
use function is_bool;
|
||||
use function is_object;
|
||||
use function is_string;
|
||||
use function mb_check_encoding;
|
||||
@ -421,6 +422,9 @@ final class Utils{
|
||||
if(is_string($value)){
|
||||
return "string[" . strlen($value) . "] " . substr(Utils::printable($value), 0, $maxStringLength);
|
||||
}
|
||||
if(is_bool($value)){
|
||||
return $value ? "true" : "false";
|
||||
}
|
||||
return gettype($value) . " " . Utils::printable((string) $value);
|
||||
}, $args));
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user