Skip to content

Conversation

@Hackwar
Copy link
Contributor

@Hackwar Hackwar commented Aug 29, 2023

Summary of Changes

Right now we are not handling NULL values properly in export and import. We are effectively converting them from NULL to an empty string, which is actually a big problem. This PR adds a new attribute to the exported data value_is_null. If that attribute is set, on import it is replaced with NULL.

Right now, this also creates lots of errors in PHP 8.1, because htmlspecialchars() should not be called with a NULL value.

Testing Instructions

On PHP 8.1 in Joomla call the CLI database exporter and see the notices. Apply the changes and instead of the notices see the new attribute. Works especially well in Joomla 5.

Documentation Changes Required

This is a change in behavior, however for current backups the behavior would still be the same as before. Instead of a NULL value, you get an empty string. Also new exports would still be possible to be imported by old importers with the same behavior as before. The correct behavior to keep the NULL values would only work when both sides had this new feature and otherwise would simply behave like right now.

@Hackwar Hackwar merged commit a0fcfc1 into joomla-framework:2.0-dev Sep 22, 2023
@Hackwar Hackwar deleted the 2.0-exporter-null branch September 22, 2023 09:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants