• Resolved Sheenmo

    (@guanyixi)


    When adding a new pattern category get a fatal error: Fatal error: Cannot use empty array elements in arrays.

    The register_block_pattern_category() function was created with error like this (extra comma):

    register_block_pattern_category( ‘landing-page’, [ ‘label’ => ‘Landing Page’, , ‘pm_custom’ => true ] );

    • This topic was modified 1 year, 2 months ago by Sheenmo.
Viewing 1 replies (of 1 total)
  • Plugin Contributor Phil Johnston

    (@johnstonphilip)

    Can you try adding a TextDomain to your theme’s style.css file?

    To do this, open the style.css file, and in the theme header, add a TextDomain, something like this:

    Text Domain: frost

    Then try creating a pattern with a custom category again. I think that should fix this for you.

Viewing 1 replies (of 1 total)
  • The topic ‘Bug: Get a fatal error when adding a new category’ is closed to new replies.