* safe to temporarily switch to exception
*/
class CRM_Core_TemporaryErrorScope {
- static $oldFrames;
+ public static $oldFrames;
/**
* @return CRM_Core_TemporaryErrorScope
*/
public static function useException() {
- return self::create(array('CRM_Core_Error', 'exceptionHandler'), 1);
+ return self::create(['CRM_Core_Error', 'exceptionHandler'], 1);
}
/**
* @return CRM_Core_TemporaryErrorScope
*/
public static function ignoreException() {
- return self::create(array('CRM_Core_Error', 'nullHandler'));
+ return self::create(['CRM_Core_Error', 'nullHandler']);
}
/**
* @return CRM_Core_TemporaryErrorScope
*/
public static function create($callback, $modeException = NULL) {
- $newFrame = array(
+ $newFrame = [
'_PEAR_default_error_mode' => PEAR_ERROR_CALLBACK,
'_PEAR_default_error_options' => $callback,
'modeException' => $modeException,
- );
+ ];
return new CRM_Core_TemporaryErrorScope($newFrame);
}
* Read the active error-handler settings
*/
public static function getActive() {
- return array(
+ return [
'_PEAR_default_error_mode' => $GLOBALS['_PEAR_default_error_mode'],
'_PEAR_default_error_options' => $GLOBALS['_PEAR_default_error_options'],
'modeException' => CRM_Core_Error::$modeException,
- );
+ ];
}
/**