aboutsummaryrefslogtreecommitdiff
path: root/lib/Debug.php
diff options
context:
space:
mode:
authorGravatar Dag <me@dvikan.no> 2022-08-06 22:46:28 +0200
committerGravatar GitHub <noreply@github.com> 2022-08-06 22:46:28 +0200
commit2bbce8ebef8cf4f88392431aabe84a15482dc933 (patch)
tree1f5027ca69b1dfa2364bd9319e8536b86a41e928 /lib/Debug.php
parentb042412416cc4ecc71c3f9c13239661a0dd588a6 (diff)
downloadrss-bridge-2bbce8ebef8cf4f88392431aabe84a15482dc933.tar.gz
rss-bridge-2bbce8ebef8cf4f88392431aabe84a15482dc933.tar.zst
rss-bridge-2bbce8ebef8cf4f88392431aabe84a15482dc933.zip
refactor: general code base refactor (#2950)
* refactor * fix: bug in previous refactor * chore: exclude phpcompat sniff due to bug in phpcompat * fix: do not leak absolute paths * refactor/fix: batch extensions checking, fix DOS issue
Diffstat (limited to 'lib/Debug.php')
-rw-r--r--lib/Debug.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Debug.php b/lib/Debug.php
index 0b05a20d..316d5595 100644
--- a/lib/Debug.php
+++ b/lib/Debug.php
@@ -64,8 +64,8 @@ class Debug
{
static $firstCall = true; // Initialized on first call
- if ($firstCall && file_exists(PATH_ROOT . 'DEBUG')) {
- $debug_whitelist = trim(file_get_contents(PATH_ROOT . 'DEBUG'));
+ if ($firstCall && file_exists(__DIR__ . '/../DEBUG')) {
+ $debug_whitelist = trim(file_get_contents(__DIR__ . '/../DEBUG'));
self::$enabled = empty($debug_whitelist) || in_array(
$_SERVER['REMOTE_ADDR'],