aboutsummaryrefslogtreecommitdiff
path: root/app/Controllers/subscriptionController.php
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2025-08-07 22:19:45 +0200
committerGravatar GitHub <noreply@github.com> 2025-08-07 22:19:45 +0200
commit62f32ccadff77594f5b8e3ad24c4c2541ff35885 (patch)
tree29689e66fd16fcbeb385cda554890d45d66e58c2 /app/Controllers/subscriptionController.php
parent149136fbe252cca4cb8dcdb463df135094bc0f87 (diff)
PHPStan: finalise strictArrayFilter (#7794)
As well as reportPossiblyNonexistentConstantArrayOffset. And disable PHPStan-next from GitHub Action, since the work is completed for now.
Diffstat (limited to 'app/Controllers/subscriptionController.php')
-rw-r--r--app/Controllers/subscriptionController.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/Controllers/subscriptionController.php b/app/Controllers/subscriptionController.php
index 70065fc26..424b9a776 100644
--- a/app/Controllers/subscriptionController.php
+++ b/app/Controllers/subscriptionController.php
@@ -207,7 +207,7 @@ class FreshRSS_subscription_Controller extends FreshRSS_ActionController {
}
}
- $headers = array_filter(array_map('trim', $headers));
+ $headers = array_filter($headers, fn(string $header): bool => trim($header) !== '');
if (!empty($headers)) {
$opts[CURLOPT_HTTPHEADER] = array_merge($headers, $opts[CURLOPT_HTTPHEADER] ?? []);
$opts[CURLOPT_HTTPHEADER] = array_unique($opts[CURLOPT_HTTPHEADER]);
@@ -318,7 +318,7 @@ class FreshRSS_subscription_Controller extends FreshRSS_ActionController {
}
$conditions = Minz_Request::paramTextToArray('path_entries_conditions', plaintext: true);
- $conditions = array_filter(array_map('trim', $conditions));
+ $conditions = array_filter($conditions, fn(string $condition): bool => trim($condition) !== '');
$feed->_attribute('path_entries_conditions', empty($conditions) ? null : $conditions);
$feed->_attribute('path_entries_filter', Minz_Request::paramString('path_entries_filter', true));