Gazley Posted March 14, 2016 Share Posted March 14, 2016 Hi there, I have the following code: return array_merge( $include_fuel ? fuel()->getArray() : array(), [ 'utils' => $this ], $this->templateVars ); This worked fine in PW 2.x When namespaced to ProcessWire using PW3 either from the original file or, a compiled version, I get the following error: Error: Exception: Method ProcessWire::getArray does not exist or is not callable in this context (in /Applications/MAMP/htdocs/hsa/ProcessWire/wire/core/Wire.php line 346) #0 [internal function]: ProcessWire\Wire->___callUnknown('getArray', Array) #1 /Applications/MAMP/htdocs/hsa/ProcessWire/wire/core/Wire.php(303): call_user_func_array(Array, Array) #2 /Applications/MAMP/htdocs/hsa/ProcessWire/wire/core/WireHooks.php(555): ProcessWire\Wire->_callMethod('___callUnknown', Array) #3 /Applications/MAMP/htdocs/hsa/ProcessWire/wire/core/Wire.php(326): ProcessWire\WireHooks->runHooks(Object(ProcessWire\ProcessWire), 'callUnknown', Array) #4 /Applications/MAMP/htdocs/hsa/ProcessWire/wire/core/ProcessWire.php(471): ProcessWire\Wire->__call('callUnknown', Array) #5 /Applications/MAMP/htdocs/hsa/ProcessWire/wire/core/Wire.php(327): ProcessWire\ProcessWire->__call('callUnknown', Array) #6 /Applications/MAMP/htdocs/hsa/ProcessWire/wire/core/Wire.php(327): ProcessWire\ProcessWire->callUnknown('getArray', Array) #7 /Applications I get the same error if I simply call: fuel()->getArray(); FYI, this is inside a module (called Utils.module). Can anyone confirm if they see this? Many thanks. Link to comment Share on other sites More sharing options...
BitPoet Posted March 15, 2016 Share Posted March 15, 2016 Replace the fuel() call with wire('all') or wire('*') should get it working in 3.0, as LostKobrakai pointed out in this thread. 3 Link to comment Share on other sites More sharing options...
Gazley Posted March 15, 2016 Author Share Posted March 15, 2016 Thanks @BitPoet for the reference to the thread. It looks like anyone who was using the Spex module was tripped up by this one. I stopped using Spex a while back and ported most of the ideas to my own module so I had a bit more control over it. I've got to say, I never really did get the whole "fuel" concept in ProcessWire so if it's now being deprecated, it's one less thing to understand. Cheers. 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