From e6d946d62fe04e82387a8ae0e481ab9d2798db0f Mon Sep 17 00:00:00 2001 From: Jean-Christian Denis Date: Fri, 30 Jun 2023 22:55:59 +0200 Subject: [PATCH] try to be php 8.1 compliant --- src/ManageFeed.php | 2 +- src/PostsFilter.php | 12 +++++++++--- src/ZoneclearFeedServer.php | 7 ++++--- 3 files changed, 14 insertions(+), 7 deletions(-) diff --git a/src/ManageFeed.php b/src/ManageFeed.php index 578457f..73be913 100644 --- a/src/ManageFeed.php +++ b/src/ManageFeed.php @@ -386,7 +386,7 @@ class ManageFeed extends dcNsProcess ->items(array_merge( dcCore::app()->adminurl->hiddenFormFields('admin.plugin.' . My::id(), [ 'part' => 'feed', - 'feed_id' => $v->id, + 'feed_id' => (string) $v->id, 'action' => 'savefeed', ]), [ diff --git a/src/PostsFilter.php b/src/PostsFilter.php index 867db04..3392d26 100644 --- a/src/PostsFilter.php +++ b/src/PostsFilter.php @@ -52,8 +52,10 @@ class PostsFilter extends adminGenericFilterV2 /** * Posts users select + * + * @return null|dcAdminFilter */ - public function getPostUserFilter(): ?dcAdminFilter + public function getPostUserFilter() { $users = null; @@ -83,8 +85,10 @@ class PostsFilter extends adminGenericFilterV2 /** * Posts categories select + * + * @return null|dcAdminFilter */ - public function getPostCategoriesFilter(): ?dcAdminFilter + public function getPostCategoriesFilter() { $categories = null; @@ -135,8 +139,10 @@ class PostsFilter extends adminGenericFilterV2 /** * Posts by month select + * + * @return null|dcAdminFilter */ - public function getPostMonthFilter(): ?dcAdminFilter + public function getPostMonthFilter() { $dates = null; diff --git a/src/ZoneclearFeedServer.php b/src/ZoneclearFeedServer.php index 1dc8452..6d1269c 100644 --- a/src/ZoneclearFeedServer.php +++ b/src/ZoneclearFeedServer.php @@ -770,8 +770,9 @@ class ZoneclearFeedServer } # Disable } else { - dcCore::app()->auth = null; - dcCore::app()->auth = new dcAuth(); + // auth on branch My goes readonly + //dcCore::app()->auth = null; + //dcCore::app()->auth = new dcAuth(); // restore current user dcCore::app()->auth->checkUser($this->user ?? ''); } @@ -784,7 +785,7 @@ class ZoneclearFeedServer * * @return Parser|false The parsed feed */ - public static function readFeed(string $url): false|Parser + public static function readFeed(string $url) { try { $feed_reader = new Reader();