/** * Set error types for handler function * * @param int|null $nErrorTypes * @param bool $bSystem * * @return int */ public static function ErrorReporting($nErrorTypes = null, $bSystem = false) { if (func_num_args() == 1 && is_bool($nErrorTypes)) { $bSystem = $nErrorTypes; $nErrorTypes = null; } if ($bSystem) { if (is_integer($nErrorTypes)) { $nResult = error_reporting($nErrorTypes); self::$nErrorTypes = $nErrorTypes; } else { $nResult = error_reporting(); } } else { $nResult = self::$nErrorTypes; if (is_integer($nErrorTypes)) { self::$nErrorTypes = $nErrorTypes; } } return $nResult; }