summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2021-02-22 17:38:46 +0300
committerAndrew Dolgov <[email protected]>2021-02-22 17:38:46 +0300
commit42173386b39bed4b06c5ac6c2fc0da510673b354 (patch)
tree02a71889f4cb0b5874f6307e26352bd7e6772a80 /include
parentadd6242e5148d29be506d753ca4123b900427b7f (diff)
dirname(__FILE__) -> __DIR__
Diffstat (limited to 'include')
-rw-r--r--include/errorhandler.php4
-rw-r--r--include/functions.php2
2 files changed, 3 insertions, 3 deletions
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)";