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