From 23ba48c71f0d41bbe012d668349f6516dad527b4 Mon Sep 17 00:00:00 2001 From: Alexis Degrugillier Date: Fri, 5 Sep 2025 09:56:46 -0400 Subject: 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 `/..`. --- app/Models/Feed.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'app/Models/Feed.php') diff --git a/app/Models/Feed.php b/app/Models/Feed.php index 26f85093e..f85db0f2f 100644 --- a/app/Models/Feed.php +++ b/app/Models/Feed.php @@ -177,7 +177,7 @@ class FreshRSS_Feed extends Minz_Model { $attributesOnly = $contents === null && $tmpPath === ''; - require_once(LIB_PATH . '/favicons.php'); + require_once LIB_PATH . '/favicons.php'; if (!$attributesOnly && !isImgMime(is_string($contents) ? $contents : '')) { throw new FreshRSS_UnsupportedImageFormat_Exception(); } @@ -401,7 +401,7 @@ class FreshRSS_Feed extends Minz_Model { } public function faviconPrepare(bool $force = false): void { - require_once(LIB_PATH . '/favicons.php'); + require_once LIB_PATH . '/favicons.php'; if ($this->customFavicon()) { return; } -- cgit v1.2.3