Function afterFind() can be called in various contexts with different types of $results. If you don’t handle them all properly the function will not work right (which you may not care in some cases) and you’ll end up with notice level errors.
Archive for November, 2008
What you can expect as $results in afterFind()
Sunday, November 16th, 2008Ganymede / PHPEclipse – not a good choice for debugging CakePHP
Friday, November 14th, 2008After hours of trying I finally conclude that CakePHP cannot be debugged in Eclipse 3.4.1 (Ganymede) and PHPEclipse 1.2.1.200810130444PRD (XDebug).
My webroot is set to app/webroot and Eclipse stops on a breakpoint only if it’s in app/webroot/index.php
Even after it stops there it won’t stop on a next breakpoint that is set in my controller.
The only working solution I found is downgrading to Eclipse 3.3.2 (Europa) and PDT 1.0.3.v20080603. Fortunately both can run side by side so in theory, I can write new code in Ganymede and debug in Europa but that sucks. Programming is a constant debugging.
I could try to switch from XDebug to DBG. Maybe I will next time I have a day that I can waste.
Update:
New PDT 2.0.0.v20081030-1802 works with Ganymede/XDebug just fine. It also has features I have been missing like Mark Occurrences – one more reason for switching. It doesn’t have support for chm help files though (PHPEclipse does) and is generally slower than PHPEclipse.