From 288ed04ccc30b58373576dc3be811aee43e67034 Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Fri, 31 Mar 2023 08:23:39 +0200 Subject: PHPStan level 6 for all PDO and Exception classes (#5239) * PHPStan level 6 for all PDO and Exception classes Contributes to https://github.com/FreshRSS/FreshRSS/issues/4112 * Fix type * Now also our remaining own librairies * Motivation for a few more files * A few more DAO classes * Last interface --- app/Controllers/feedController.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'app/Controllers/feedController.php') diff --git a/app/Controllers/feedController.php b/app/Controllers/feedController.php index 2fcc5eda6..0e98d1e16 100644 --- a/app/Controllers/feedController.php +++ b/app/Controllers/feedController.php @@ -47,10 +47,11 @@ class FreshRSS_feed_Controller extends FreshRSS_ActionController { $url = trim($url); /** @var string|null $url */ - $url = Minz_ExtensionManager::callHook('check_url_before_add', $url); - if (null === $url) { + $urlHooked = Minz_ExtensionManager::callHook('check_url_before_add', $url); + if ($urlHooked === $url) { throw new FreshRSS_FeedNotAdded_Exception($url); } + $url = $urlHooked; $cat = null; if ($cat_id > 0) { -- cgit v1.2.3