Solo Creative Posted April 21, 2016 Share Posted April 21, 2016 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 More sharing options...
adrian Posted April 21, 2016 Share Posted April 21, 2016 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 More sharing options...
Solo Creative Posted April 25, 2016 Author Share Posted April 25, 2016 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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now