I have a weird problem with ActiveRecord with a particular class.
When calling findAll() I get a blank page. No errors at all displaying even though I have full error reporting switched on. Yii log shows nada.
I have tried switching off both relations and rules in the class and still nothing.
findByPk works just fine, calling this within the same class method as a test.
Has anybody ever encountered something like this?
If you’re sure error logging is enabled and logs are still empty this could be caused by the ‘@’ operator that supresses a fatal error.
The fastest way to confirm that and locate the error is to debug step by step using xdebug.
Does this happen in multiple enviroments? That is, on your production server and dev machine?
The application is in my dev environment. So far I have only spotted the problem with one particular class.
Logging is definitely switched on - I tested it also by deliberately throwing an error.
My environment has xdebug and it picks up nada.
If I set xdebug.scream = 1 then the script halts on @session_start(); in framework/web/CHttpSession.php… which is really sloppy coding in my opinion!
Turned out simply to be the ActiveRecord object consuming too much memory for what I thought was a relatively small result set.
Moving over to DAO instead… (again).