summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorwn_ <[email protected]>2021-11-11 20:46:42 +0000
committerwn_ <[email protected]>2021-11-11 20:47:29 +0000
commit00b86bac39f63bc8d23bba470c8f53d5b7c97e6a (patch)
tree8de06c008b183477e64ed65b974f6499ba5e638f /include
parente4b8e2d0631825ff0d3fa7bd5eb6e88414facd92 (diff)
Address PHPStan warnings in 'include/errorhandler.php'.
Diffstat (limited to 'include')
-rw-r--r--include/errorhandler.php9
1 files changed, 6 insertions, 3 deletions
diff --git a/include/errorhandler.php b/include/errorhandler.php
index 3211599ba..09d6bd7bc 100644
--- a/include/errorhandler.php
+++ b/include/errorhandler.php
@@ -1,5 +1,8 @@
<?php
-function format_backtrace($trace) {
+/**
+ * @param array<int, array<string, mixed>> $trace
+ */
+function format_backtrace($trace): string {
$rv = "";
$idx = 1;
@@ -39,7 +42,7 @@ function format_backtrace($trace) {
return $rv;
}
-function ttrss_error_handler($errno, $errstr, $file, $line) {
+function ttrss_error_handler(int $errno, string $errstr, string $file, int $line): bool {
/*if (version_compare(PHP_VERSION, '8.0.0', '<')) {
if (error_reporting() == 0 || !$errno) return false;
} else {
@@ -59,7 +62,7 @@ function ttrss_error_handler($errno, $errstr, $file, $line) {
return false;
}
-function ttrss_fatal_handler() {
+function ttrss_fatal_handler(): bool {
$error = error_get_last();
if ($error !== NULL) {