From: Tim Düsterhus Date: Mon, 20 Sep 2021 13:44:14 +0000 (+0200) Subject: Fix PHP 8.1 compatibility in DatabaseObjectList X-Git-Tag: 5.4.8_dev_1~21^2~1 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=3f6b343d10b044ab08d41fec525f69ffe0a95e49;p=GitHub%2FWoltLab%2FWCF.git Fix PHP 8.1 compatibility in DatabaseObjectList > 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 […] --- 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); }