Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[5.x] SVG tag throws loadXML error when src value is empty #9902

Closed
mikemartin opened this issue Apr 16, 2024 · 0 comments
Closed

[5.x] SVG tag throws loadXML error when src value is empty #9902

mikemartin opened this issue Apr 16, 2024 · 0 comments
Labels

Comments

@mikemartin
Copy link

mikemartin commented Apr 16, 2024

Bug description

When using the following svg tag, the below error was thrown because the icon value did not exist:
{{ svg src="{{ icon }}" class="w-6 h-6 lg:w-7 lg:h-7 text-primary-700" }}

I could check that the value exists first but I think the SVG tag should fail gracefully if the source is empty.

How to reproduce

Create svg tag with empty src value.
{{ svg src="{{ foo }}" }}

Logs

DOMDocument::loadXML(): Argument #1 ($source) must not be empty
https://flareapp.io/share/NPLWLOrm

Environment

Environment
Application Name: Burlingame
Laravel Version: 11.3.1
PHP Version: 8.2.16
Composer Version: 2.7.1
Environment: local
Debug Mode: ENABLED
URL: burlingame.test
Maintenance Mode: OFF

Cache
Config: CACHED
Events: NOT CACHED
Routes: NOT CACHED
Views: CACHED

Drivers
Broadcasting: log
Cache: statamic
Database: mysql
Logs: stack / single
Mail: smtp
Queue: redis
Session: file

Livewire
Livewire: v3.4.10

Statamic
Addons: 0
Sites: 1
Stache Watcher: Disabled
Static Caching: Disabled
Version: 5.0.0-alpha.3 PRO

Installation

Other (please explain)

Antlers Parser

Runtime (default)

Additional details

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants