fix typo and typehint

Dieser Commit ist enthalten in:
o.pinke 2023-07-04 17:09:34 +02:00
Ursprung 2e386d7c41
Commit 46c1c1c3c3
2 geänderte Dateien mit 26 neuen und 27 gelöschten Zeilen

Datei anzeigen

@ -134,5 +134,3 @@ match ($iStep) {
'doinstall' => checkAndInclude('steps/setup/doinstall.php'),
default => checkAndInclude('steps/languagechooser.php'),
};
?>

Datei anzeigen

@ -41,52 +41,52 @@ define("E_EXTENSION_CANTCHECK", 3);
* canPHPurlfopen: Checks if PHP is able to use
* allow_url_fopen.
*/
function canPHPurlfopen(): bool|string
function canPHPurlfopen(): bool
{
return ini_get("allow_url_fopen");
}
function getPHPDisplayErrorSetting(): bool|string
function getPHPDisplayErrorSetting(): bool
{
return ini_get("display_errors");
}
function getPHPFileUploadSetting(): bool|string
function getPHPFileUploadSetting(): bool
{
return ini_get("file_uploads");
}
function getPHPGPCOrder(): bool|string
function getPHPGPCOrder(): bool
{
return ini_get("gpc_order");
}
function getPHPMagicQuotesRuntime(): bool|string
function getPHPMagicQuotesRuntime(): bool
{
return ini_get("magic_quotes_runtime");
}
function getPHPMagicQuotesSybase(): bool|string
function getPHPMagicQuotesSybase(): bool
{
return ini_get("magic_quotes_sybase");
}
function getPHPMaxExecutionTime(): bool|string
function getPHPMaxExecutionTime(): bool
{
return ini_get("max_execution_time");
}
function getPHPOpenBasedirSetting(): bool|string
function getPHPOpenBasedirSetting(): bool
{
return ini_get("open_basedir");
}
function checkPHPSQLSafeMode(): bool|string
function checkPHPSQLSafeMode(): bool
{
return ini_get("sql.safe_mode");
}
function return_bytes($val): float|int|string
function return_bytes($val): float|int
{
if (strlen($val) == 0) {
return 0;
@ -94,13 +94,14 @@ function return_bytes($val): float|int|string
$val = trim($val);
$last = $val[strlen($val) - 1];
return match ($last) {
'k', 'K' => (int) $val * 1024,
'm', 'M' => (int) $val * 1_048_576,
'k', 'K' => (int)$val * 1024,
'm', 'M' => (int)$val * 1_048_576,
default => $val,
};
}
function isPHPExtensionLoaded($extension) {
function isPHPExtensionLoaded($extension)
{
$value = extension_loaded($extension);
if ($value === true) {