IchHabRecht / content_defender

Define allowed or denied content element types in your backend layouts
GNU General Public License v2.0
80 stars 35 forks source link

Usage of deprecated "fetch" Method leads in exception (PHP 8.1) #127

Closed DavidR93 closed 1 year ago

DavidR93 commented 1 year ago

Using the deprecated "fetch" method in ContentRepository.php line 146 results in an exception when using TYPO3 version 11.5.24 and PHP 8.1.13.

TYPO3\CMS\Core\Error\Exception PHP Runtime Deprecation Notice: PDOStatement::fetch(): Passing null to parameter #1 ($mode) of type int is deprecated in /var/www/html/Source/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php line 138

Enviroment: ichhabrecht/content-defender 3.2.3 TYPO3 11.5.24 PHP 8.1.13

DavidR93 commented 1 year ago

Hey @IchHabRecht, first of all thanks for this great extension!

I left a suggestion how to fix the problem. Maybe you can have a look at it and leave your opinion.

Best regards David

DavidR93 commented 1 year ago

Fixed with version 3.3.0 :)