Remove superfluous parentheses
This commit is contained in:
@ -383,7 +383,7 @@ final class MD_STD {
|
||||
];
|
||||
|
||||
if (isset($_GET['navlang']) and in_array($_GET['navlang'], $allowed_langs, true)) {
|
||||
if (!(setcookie('__Host-lang', $_GET['navlang'], $cookie_options))) {
|
||||
if (!setcookie('__Host-lang', $_GET['navlang'], $cookie_options)) {
|
||||
throw new Exception("Failed to set language");
|
||||
}
|
||||
$lang = $_GET['navlang'];
|
||||
@ -393,7 +393,7 @@ final class MD_STD {
|
||||
}
|
||||
else {
|
||||
$lang = self::lang_getfrombrowser($allowed_langs, $default_lang, "", false);
|
||||
if (!(setcookie('__Host-lang', $lang, $cookie_options))) {
|
||||
if (!setcookie('__Host-lang', $lang, $cookie_options)) {
|
||||
throw new Exception("Failed to set language");
|
||||
}
|
||||
}
|
||||
@ -521,7 +521,7 @@ final class MD_STD {
|
||||
*/
|
||||
public static function human_filesize(int $bytes, int $decimals = 2):string {
|
||||
|
||||
$size = ['B','kB','MB','GB','TB','PB','EB','ZB','YB'];
|
||||
$size = ['B', 'kB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'];
|
||||
$factor = \floor((\strlen((string)$bytes) - 1) / 3);
|
||||
return \sprintf("%.{$decimals}f", $bytes / \pow(1024, $factor)) . $size[$factor];
|
||||
|
||||
|
Reference in New Issue
Block a user