[5.8.12] Gettext array_key_exists() ConversionException

Versions:

  • PHP 7.4
  • CMS 8.5.12
  • concrete5/dependency-patches 1.6.1
  • zendframework/zend-i18n 2.7.4

When setting up the express entities, no exceptions occurred also while adding new entries (already with PHP7.4). After 5 months an exception is thrown, when trying to access the entry pages of the express entities:

Doctrine \ DBAL \ Types \ 
ConversionException
Could not convert database value to 'object' as an error was triggered by the unserialization: 'array_key_exists(): Using array_key_exists() on objects is deprecated. Use isset() or property_exists() instead'

The code triggering this exception is here: …/vendor/zendframework/zend-i18n/src/Translator/Loader/Gettext.php142

I can’t update zendframework/zend-i18n to 2.10.1 (which has fixed the above issue) because concretecms is bound to 2.7.*.
I didn’t see a fix in the dependeny-patches, therefore my question:
Is there a known fix of this exception?
(downgrade to PHP7.3 is only the really last possibility)

I finally downgraded to PHP 7.3 and the problem was fixed.
Since PHP7.4 is the recommended version for concretecms 8.5.12 this exception could be fixed by using zendframework/zend-i18n 2.10.1.

Did I forgot something by fixing the exception? Otherwise I will open a bug report on github.

Opening a bug report would be great, thanks!

@EvanCooper Sorry, I was ill the last days. PR created: fix #11720 - Avoid using deprecated array key exists by 1stthomas · Pull Request #11721 · concretecms/concretecms · GitHub

Pull request got merged.