fix wrong error handling.

error_reporing(0) doesn't return the current error_reporting.

see http://www.php.net/manual/en/function.error-reporting.php