laminas/laminas-db

PHP Deprecated error with PDO::quote() in PHP 8.1

victorjkhalaf opened this issue · 2 comments

Bug Report

Q A
Version(s) 2.13.4

Summary

Current behavior

During normal execution of our website we may encounter this logged error:

PDO::quote(): Passing null to parameter #1 ($string) of type string is deprecated in /../vendor/laminas/laminas-db/src/Adapter/Platform/Mysql.php on line 121

How to reproduce

Expected behavior

On line 121 I believe it should accept a null value and cast it to a string as the called \PDO::quote method's first argument $string is supposed to be a string (it may become a strongly typed argument in the future?).

Module "laminas/laminas-db" is frozen (see forum ).
You can fix it in your own clone, or migrate to Doctrine DBAL.

If anybody wants to step up, please do, but beware that we just removed the previous maintainers, since they never showed up for duty: https://github.com/laminas/technical-steering-committee/blob/e3fca80acd697b2186768d9259f1f1d955c022af/meetings/minutes/2022-02-07-TSC-Minutes.md#is-laminas-db-abandoned

Thank you for providing this update! I'll close the issue and we'll internally review how to move forward.