/** @deprecated */ public static function catchError(&$error) { trigger_error(__METHOD__ . '() is deprecated; use own error handler instead.', E_USER_DEPRECATED); if (!self::$enabled && self::$lastError !== FALSE) { restore_error_handler(); } $error = self::$lastError; self::$lastError = FALSE; return (bool) $error; }
/** * Returns catched error/warning message. * @param \ErrorException catched error * @return bool */ public static function catchError(&$error) { if (!self::$enabled && self::$lastError !== FALSE) { restore_error_handler(); } $error = self::$lastError; self::$lastError = FALSE; return (bool) $error; }
tryError(){if(!self::$enabled&&self::$lastError===FALSE){set_error_handler(array(__CLASS__,'_errorHandler'));}self::$lastError=NULL;}static function catchError(&$error){if(!self::$enabled&&self::$lastError!==FALSE){restore_error_handler();}$error=self::$lastError;self::$lastError=FALSE;return(bool)$error;}static