Tyssen Posted January 7, 2020 Share Posted January 7, 2020 I've added a function to my _init file but found it wasn't working until I added a namespace to _init and any other file calling a function from _init. But on one template I've got new SimpleXMLElement which is causing the 'class not found error' which appears to be due to the namespacing. What do I need to do to solve that? Link to comment Share on other sites More sharing options...
Robin S Posted January 7, 2020 Share Posted January 7, 2020 24 minutes ago, Tyssen said: What do I need to do to solve that? Prefix the name with \ to specify the global space: $foo = new \SimpleXMLElement($data); 1 Link to comment Share on other sites More sharing options...
Tyssen Posted January 7, 2020 Author Share Posted January 7, 2020 Wow, that simple. Thanks! ? 1 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