From 3f6b343d10b044ab08d41fec525f69ffe0a95e49 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim=20D=C3=BCsterhus?= Date: Mon, 20 Sep 2021 15:44:14 +0200 Subject: [PATCH] Fix PHP 8.1 compatibility in DatabaseObjectList MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit > Return type of wcf\data\DatabaseObjectList::count() should either be > compatible with Countable::count(): int, or the #[ReturnTypeWillChange] > attribute should be used to temporarily suppress the notice […] --- wcfsetup/install/files/lib/data/DatabaseObjectList.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wcfsetup/install/files/lib/data/DatabaseObjectList.class.php b/wcfsetup/install/files/lib/data/DatabaseObjectList.class.php index c47a762e7c..2741d80696 100644 --- a/wcfsetup/install/files/lib/data/DatabaseObjectList.class.php +++ b/wcfsetup/install/files/lib/data/DatabaseObjectList.class.php @@ -309,7 +309,7 @@ abstract class DatabaseObjectList implements \Countable, ITraversableObject /** * @inheritDoc */ - public function count() + public function count(): int { return \count($this->objects); } -- 2.20.1