Added isset checks to avoid "undefined index" errors when error_reporting is set to e_all in php.ini