We have two sets of ORM models that we’re trying to query. They’re nearly identical in function and form, but only one of them causes an “ErrorException [ Error ]: Class 'Error' not found” to pop up when we try to build a query from them in a controller. It doesn’t occur when calling ->get(), just when asking for a query object at all (e.g., Model_Fu::query()). And it doesn’t even happen in all cases.
We’ve been using this same code for months, and when making almost a duplicate of it in Model_Fu (and one related model), it has broken. They both extend the same class (just Model with a few helper functions).
The stack trace traces it to the bottom of our Model_Fu file like it’s trying to look for the Error class in Model_Fu’s file. Looking into the source of some ORM classes that we thought might host the problem, we found everywhere that they were throwing \Error (in the global namespace), so why it was having trouble finding the \Error really puzzled us. So, does anyone know what kinds of things might cause that kind of error to be thrown? Are we missing something obvious?
Sometimes when in the error handler the PHP autoloader refuses to work. It's a bug in specific PHP versions.
Which Fuel version are you using? We've tried to find some workarounds for this issue, not sure if they are in 1.7.1 or i 1.8/develop (which will become 1.7.2. next week). If you're not on the latest version, I suggest you upgrade and see if that helps?
Problem is you have an error elsewhere, but it's supressed because of the new "Error not found" error.
It works! It totally works! It didn't just show me a better error report; it fixed all my problems. I'm finally reunited with my long lost twin, and my daddy issues are all resolved, and I'm not allergic to strawberries anymore. Oh frabjous day! Thanks, Harro! Thanks Fuel Team!