From 42173386b39bed4b06c5ac6c2fc0da510673b354 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Mon, 22 Feb 2021 17:38:46 +0300 Subject: dirname(__FILE__) -> __DIR__ --- include/errorhandler.php | 4 ++-- include/functions.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/errorhandler.php b/include/errorhandler.php index fab559b76..68e2285c1 100644 --- a/include/errorhandler.php +++ b/include/errorhandler.php @@ -48,7 +48,7 @@ function ttrss_error_handler($errno, $errstr, $file, $line) { if (error_reporting() == 0 || !$errno) return false; - $file = substr(str_replace(dirname(dirname(__FILE__)), "", $file), 1); + $file = substr(str_replace(dirname(__DIR__), "", $file), 1); $context = format_backtrace(debug_backtrace()); $errstr = truncate_middle($errstr, 16384, " (...) "); @@ -72,7 +72,7 @@ function ttrss_fatal_handler() { $context = format_backtrace(debug_backtrace()); - $file = substr(str_replace(dirname(dirname(__FILE__)), "", $file), 1); + $file = substr(str_replace(dirname(__DIR__), "", $file), 1); if ($last_query) $errstr .= " [Last query: $last_query]"; diff --git a/include/functions.php b/include/functions.php index 1f25f6947..7c4e32963 100644 --- a/include/functions.php +++ b/include/functions.php @@ -620,7 +620,7 @@ $ttrss_version['version'] = "UNKNOWN (Unsupported)"; date_default_timezone_set('UTC'); - $root_dir = dirname(dirname(__FILE__)); + $root_dir = dirname(__DIR__); if (PHP_OS === "Darwin") { $ttrss_version['version'] = "UNKNOWN (Unsupported, Darwin)"; -- cgit v1.2.3-54-g00ecf