1
0
mirror of https://git.tt-rss.org/git/tt-rss.git synced 2025-12-15 18:25:55 +00:00

initial WIP for php8; bump php version requirement to 7.0

This commit is contained in:
Andrew Dolgov
2021-02-05 23:41:32 +03:00
parent b4cbc792cc
commit 403dca154c
28 changed files with 145 additions and 144 deletions

View File

@@ -10,10 +10,12 @@ function format_backtrace($trace) {
if (is_array($e["args"])) {
foreach ($e["args"] as $a) {
if (!is_object($a)) {
array_push($fmt_args, $a);
} else {
if (is_object($a)) {
array_push($fmt_args, "[" . get_class($a) . "]");
} else if (is_array($a)) {
array_push($fmt_args, "[" . truncate_string(json_encode($a), 128, "...")) . "]";
} else {
array_push($fmt_args, $a);
}
}
}
@@ -21,7 +23,11 @@ function format_backtrace($trace) {
$filename = str_replace(dirname(__DIR__) . "/", "", $e["file"]);
$rv .= sprintf("%d. %s(%s): %s(%s)\n",
$idx, $filename, $e["line"], $e["function"], implode(", ", $fmt_args));
$idx,
$filename,
$e["line"],
$e["function"],
implode(", ", $fmt_args));
$idx++;
}