1
0

continue working on selftest

This commit is contained in:
2020-01-19 13:16:40 +01:00
parent 335fc764e8
commit a78d8ff9c9
22 changed files with 204 additions and 49 deletions

View File

@@ -220,6 +220,13 @@ function isHTTPRequest()
return (!isset($_SERVER['HTTPS'])) || empty($_SERVER['HTTPS']) || $_SERVER['HTTPS'] == "off";
}
function str_max_len(string $str, int $max)
{
if (strlen($str) < $max) return $str;
return substr($str, 0, $max-3)."...";
}
function formatException($e)
{
if ($e === null) return "NULL";