Hi
I know this is an old thread now, but I'm hoping I can provide some useful information relating to this error, as I encountered it myself recently when installing ProcessWire on Vidahost Cloud hosting.
I eventually managed to trace the problem back to a probable cause, and a solution - please bear with me
The "non-object" mentioned in the error was the "type" property (which was NULL) of the fieldtypes list for a template (the loop in Pages.php).
It was NULL because fieldtype information was not set when initialised.
... because the list of modules could not be loaded and returned to the functions relying on them.
I think this was caused by the findModuleFiles() function. Although it seemed it could create the file on the first call of this function, the combination of network file system in the cloud hosting (which introduced a delay in file access) and the LOCK_EX parameter meant that the data couldn't actually be written to it.
On next calls to the findModuleFiles() function, the cache file "exists", but its empty contents are returned - resulting in the error.
From testing, my proposed change removes the LOCK_EX parameter, which allows the data to be written to the file correctly. In addition, if the cache exists - the content is only returned if the array isn't empty.
My proposed code changes are a pull request on GitHub if anyone else encounters this problem.