Nothing jumps out at me, but do you have Developer level debugging switched on?
Just an aside - always write Moodle custom code as proper plugins (e.g. /local/myplugin, /report/myreport) rather than creating a whole new structure. Loads of stuff is done for you