netgen / ezpublish-legacy

eZ Publish 4.x (legacy) kernel, maintained by Netgen for compatibility with eZ Platform
https://netgen.io
Other
4 stars 17 forks source link

PHP 8.0: Preventing Fatal error in PHP 8 for ezmatrix datatype #54

Open thiagocamposviana opened 1 week ago

thiagocamposviana commented 1 week ago

Preventing Fatal error in PHP 8 for ezmatrix datatype when data_text is an empty string or null.

We want to standardize the data_text default value to an empty string because in PHP 8 most of operations with string will throw a Fatal error when passing null. The data_text value is initialized with a null value when adding a new attribute to an existing content class.

emodric commented 6 days ago

Hi!

This is a bit tricky to accept since it requires database change. The point of this fork is to be 100% database compatible with Ibexa.

Upgrades are also somewhat challenging as there is no upgrade instructions, and I'm not really interested nor have the time to maintain them.

Can this issue you're having be solved with changes in PHP code only?

thiagocamposviana commented 6 days ago

Hi @emodric I think you have a good point. We might re-evaluate the strategy here internally to deal with this, but yes, changing the database might be a bit problematic.