FluidTYPO3 / vhs

TYPO3 extension VHS: Fluid ViewHelpers
https://fluidtypo3.org
Other
189 stars 228 forks source link

PHP 8 Deprecation in v:resource.record.fal #1857

Closed rk-mxp closed 1 year ago

rk-mxp commented 1 year ago

The v:resource.record.fal ViewHelper throws the following PHP 8 deprecation:

PHP Runtime Deprecation Notice: PDOStatement::fetch(): Passing null to parameter #1 ($mode) of type int is deprecated in /.../vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php line 138

Reason is the FluidTYPO3\Vhs\ViewHelpers\Resource\Record\AbstractRecordResourceViewHelper::getRecord function. The function uses the deprecated fetch function of the Doctrine ResultStatement with no parameter for fetchMode (making it null). The null value gets propagated in Doctrine to the PHP class PDOStatement that defines fetchMode as int, resulting in the above mentioned error.

Solution:

NamelessCoder commented 1 year ago

There are no more usages of deprecated Doctrine function calls.