Skip to content

Version 2.0 throws fatal error - DOMDocument::loadHTML argument must not be empty #108

@imrelaur

Description

@imrelaur

Hey,

I am using PHP 8.3, WordPress 6.8.3 and REST API Block 2.0.

When I installed the new version then I got this error:

PHP Fatal error:  Uncaught ValueError: DOMDocument::loadHTML(): Argument #1 ($source) must not be empty in /wp-content/plugins/rest-api-blocks/vendor/imangazaliev/didom/src/DiDom/Document.php:280

Some of my custom blocks return no HTML at all. Since on the front-end we don't use it and because of that we don't return it. We only return it when it is a preview. We use ACF Pro plugin and their blocks version 3. If the block is being previewed in the editor, then it returns HTML.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions