ValueError: DOMDocument::loadXML(): Argument #1 ($source) must not be empty

Created on 14 February 2024, 10 months ago

Problem/Motivation

When an XML feed returns an empty string, the there will be a fatal error:

ValueError: DOMDocument::loadXML(): Argument #1 ($source) [error]
must not be empty in DOMDocument->loadXML() (line 41 of
/var/www/lehrberuf/docroot/profiles/recruiter/modules/feeds_xpathparser/FeedsXPathParserXML.inc).#0
/var/www/lehrberuf/docroot/profiles/recruiter/modules/feeds_xpathparser/FeedsXPathParserXML.inc(41):

This should be a normal exception, not a fatal error.

Steps to reproduce

Try to import an XML feed that is empty.

Proposed resolution

Check if feed is empty.

Remaining tasks

PR review

πŸ› Bug report
Status

Active

Version

1.0

Component

Code

Created by

πŸ‡¦πŸ‡ΉAustria klausi πŸ‡¦πŸ‡Ή Vienna

Live updates comments and jobs are added and updated live.
  • PHP 8.1

    The issue particularly affects sites running on PHP version 8.1.0 or later.

Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024