Gallery Block Gap fatal error #40158
Labels
[Block] Gallery
Affects the Gallery Block - used to display groups of images
[Type] Bug
An existing feature does not function as intended
Description
When adding a value to "Block Spacing" in a gallery block, I get:
PHP Fatal error: Uncaught TypeError: preg_match(): Argument #2 ($subject) must be of type string, array given in /wp-content/plugins/gutenberg/build/block-library/blocks/gallery.php:51
If I var_dump the value of the $gap variable, I get this value:
array(2) { ["top"]=> string(4) "30px" ["left"]=> string(4) "30px" }
If I clear out the block spacing value, or comment out the preg_match line, things work.
Step-by-step reproduction instructions
Screenshots, screen recording, code snippet
Environment info
Please confirm that you have searched existing issues in the repo.
Yes
Please confirm that you have tested with all plugins deactivated except Gutenberg.
Yes
The text was updated successfully, but these errors were encountered: