diff options
| author | 2025-09-05 09:56:46 -0400 | |
|---|---|---|
| committer | 2025-09-05 15:56:46 +0200 | |
| commit | 23ba48c71f0d41bbe012d668349f6516dad527b4 (patch) | |
| tree | b5680e834c2b87becdded07e0555227ade9d7629 /lib/lib_rss.php | |
| parent | 3d85eb19380021031e9d1193919ba516bbc99573 (diff) | |
Change how files are included (#7916)
1. `include`, `include_once`, `require` and `require_once` are expressions not functions, parentheses are not necessary.
2. to move up the directory tree, it's better to use the `dirname` function instead of relying on `/..`.
Diffstat (limited to 'lib/lib_rss.php')
| -rw-r--r-- | lib/lib_rss.php | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/lib_rss.php b/lib/lib_rss.php index 27020960e..b7c3817ee 100644 --- a/lib/lib_rss.php +++ b/lib/lib_rss.php @@ -43,17 +43,17 @@ function classAutoloader(string $class): void { $components = explode('_', $class); switch (count($components)) { case 1: - include(APP_PATH . '/' . $components[0] . '.php'); + include APP_PATH . '/' . $components[0] . '.php'; return; case 2: - include(APP_PATH . '/Models/' . $components[1] . '.php'); + include APP_PATH . '/Models/' . $components[1] . '.php'; return; case 3: //Controllers, Exceptions - include(APP_PATH . '/' . $components[2] . 's/' . $components[1] . $components[2] . '.php'); + include APP_PATH . '/' . $components[2] . 's/' . $components[1] . $components[2] . '.php'; return; } } elseif (strpos($class, 'Minz') === 0) { - include(LIB_PATH . '/' . str_replace('_', '/', $class) . '.php'); + include LIB_PATH . '/' . str_replace('_', '/', $class) . '.php'; } elseif (str_starts_with($class, 'SimplePie\\')) { $prefix = 'SimplePie\\'; $base_dir = LIB_PATH . '/simplepie/simplepie/src/'; |
