WordPress 6.4 blocks issue – Fatal error
-
After updating to WordPress 6.5, pages using Spectra (UAG) blocks began crashing with the following fatal error:
PHP Fatal error: Uncaught TypeError: array_intersect_key(): Argument #1 ($array) must be of type array, string given in /wp-includes/block-supports/layout.phpRoot Cause:
Spectra blocks (especiallyuagb/containerandUAGBCounter) are savinglayoutas a string, for example:"layout": "grid"However, as of recent WordPress core updates,
layoutmust be an object, e.g.:"layout": { "type": "grid" }This results in a fatal crash during block rendering due to
array_intersect_key()expecting an array.How We Identified It:
- Issue only occurred on pages using Spectra blocks.
- CLI and database checks confirmed multiple posts had
"layout": "grid"or"layout": "number"stored directly inpost_content.
Please confirm if this has been addressed in the latest Spectra release, and whether future block saves will conform to the new expected format.
The topic ‘WordPress 6.4 blocks issue – Fatal error’ is closed to new replies.