From d42b25cbf6d3f1e51cb2a3149f1ff54cc5474bc9 Mon Sep 17 00:00:00 2001 From: emkael Date: Thu, 7 Apr 2016 16:09:16 +0200 Subject: * Prado upgrade (to 3.3.r6b8e6601752b21a8a96c385a5529bbec7bb2b408) --- lib/prado/framework/Exceptions/TException.php | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'lib/prado/framework/Exceptions/TException.php') diff --git a/lib/prado/framework/Exceptions/TException.php b/lib/prado/framework/Exceptions/TException.php index 651adb5..2c915a4 100644 --- a/lib/prado/framework/Exceptions/TException.php +++ b/lib/prado/framework/Exceptions/TException.php @@ -4,7 +4,7 @@ * * @author Qiang Xue * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Exceptions */ @@ -357,6 +357,17 @@ class TPhpErrorException extends TSystemException $errorType=isset($errorTypes[$errno])?$errorTypes[$errno]:'Unknown Error'; parent::__construct("[$errorType] $errstr (@line $errline in file $errfile)."); } + + /** + * Returns if error is one of fatal type. + * + * @param array $error error got from error_get_last() + * @return boolean if error is one of fatal type + */ + public static function isFatalError($error) + { + return isset($error['type']) && in_array($error['type'], array(E_ERROR, E_PARSE, E_CORE_ERROR, E_CORE_WARNING, E_COMPILE_ERROR, E_COMPILE_WARNING)); + } } -- cgit v1.2.3