Jump to content

Error: Call to a member function attributes() on a non-object (line 182 of link-to-site/wire/core


Solo Creative
 Share

Recommended Posts

Hi,

I am getting the following error when trying to access a page in the admin that uses CroppableImage with an svg uploaded (CroppableImage in a Repeater if that makes any difference).

Error: Call to a member function attributes() on a non-object (line 182 of link-to-site/wire/core/Pageimage.php)

Anyone know what might be causing this?

Thanks.

Link to comment
Share on other sites

Looks like it can't get the SVG's attributes which suggests that the SVG in questions doesn't have a width/height set. That is OK though - that is a valid situation. However line 182 includes the shutup operator to silence this error:

$a = @simplexml_load_string($xml)->attributes();

Is your config overriding the silencer?

Link to comment
Share on other sites

Thanks Adrian,

I'm not sure tbh, I'm not an experienced PW user. I just changed the field to not include SVGs as we are on deadline. Not an ideal solution but I don't think our client will ever use SVGs so for now it is a solution that we are happy with.

Thanks for your help with this.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...