After working on some code today, I came across this error.
What's odd is that EVERYTHING loads fine. The page renders, no warnings, nothing. Then, after the template is pushed to the browser, the error message "Fatal error: Exception thrown without a stack frame in Unknown on line 0" is sent as well.
Any ideas on how to trace this? My basic logic inside the controller is:
This indicates an error in either the error handler or the shutdown handler (most likely). By this time PHP is already tearing down the session, and no error handler is available anymore, so it barfs out this fine and descriptive error message... :-(
Try searching here, it's been discussed before, perhaps that can give you some pointers.
I searched for the general error on Google and came across this link that mentions having this error thrown when storing objects in Session, or at least some serialization issue. I had just changed some code to store some often-used values in session.
I removed that and can handle it another way. But, is there a good way to store these values (like a list of objects returned from a model) where they're easily accessible to multiple functions within the controller? Like a global variable that can be accessed by all functions within the controller or across multiple controllers?
Objects tend to be very big, so storing them in the session might not be a good idea. Also, if you use ORM, know that objects are cached, so you can do a find on primary key in another method without it generating a new query.