joe_g Posted November 28, 2017 Share Posted November 28, 2017 So I ran into this peculiarity: If I put this piece of code at the end of my 'util.php' (included first on my head.php) — then things work: <? function totallyRandomFunctionName() { /* wire('pages');*/ } ?> Note how wire('pages') is commented out, but it still somehow does the job. Now, if I remove the commented line: <? function totallyRandomFunctionName() { } ?> Then I get this error earlier in util.php, suddenly the wire function isn't existing...: Uncaught Error: Call to undefined function wire() in /xx/util.php:86 Line 86 has: "wire('config')->urls->root" in it. I'm quite curious what goes on here! Link to comment Share on other sites More sharing options...
louisstephens Posted November 28, 2017 Share Posted November 28, 2017 I assume you are using the namespace in your util.php file? <?php namespace ProcessWire; 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