Esempio n. 1
0
 /** @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;
 }
Esempio n. 3
0
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