This error is encountered when upgraded PHP to 8.1
Check ( $svg_file ) if empty to avoid errors from loadXML() Function

CommentFileSizeAuthor
#3 svg-image-field-3337975-3.patch767 byteshimanshu5050

Comments

Himanshu5050 created an issue. See original summary.

himanshu5050’s picture

Issue summary: View changes
himanshu5050’s picture

StatusFileSize
new767 bytes
himanshu5050’s picture

Status: Active » Needs review

  • mandclu committed d0a75656 on 2.2.x
    Issue #3337975 by Himanshu5050: DOMDocument::loadXML(): Argument #1 ($...
mandclu’s picture

Version: 2.2.0-beta1 » 2.2.x-dev
Status: Needs review » Fixed

Thanks for identifying this, and for providing a fix. I do sort of wonder if some of the following lines should also be brought into that new condition as operating on an empty DOMDocument doesn't seem like the intended behaviour, but that probably needs some more thinking about what should be done if the SVG file can't be loaded.

jwilson3’s picture

This issue was reported already and was under review and testing in a separate issue #3333776: Add inline SVG support for stage_file_proxy. The scope is slightly wider on that issue but the same error message is mentioned in the IS.

@Himanshu5050: Please search the issue queue first next time.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.