comparison vendor/zendframework/zend-stdlib/src/ErrorHandler.php @ 12:7a779792577d

Update Drupal core to v8.4.5 (via Composer)
author Chris Cannam
date Fri, 23 Feb 2018 15:52:07 +0000
parents 4c8ae668cc8c
children 5fb285c0d0e3
comparison
equal deleted inserted replaced
11:bfffd8d7479a 12:7a779792577d
49 * 49 *
50 * @param int $errorLevel 50 * @param int $errorLevel
51 */ 51 */
52 public static function start($errorLevel = \E_WARNING) 52 public static function start($errorLevel = \E_WARNING)
53 { 53 {
54 if (!static::$stack) { 54 if (! static::$stack) {
55 set_error_handler([get_called_class(), 'addError'], $errorLevel); 55 set_error_handler([get_called_class(), 'addError'], $errorLevel);
56 } 56 }
57 57
58 static::$stack[] = null; 58 static::$stack[] = null;
59 } 59 }
70 $errorException = null; 70 $errorException = null;
71 71
72 if (static::$stack) { 72 if (static::$stack) {
73 $errorException = array_pop(static::$stack); 73 $errorException = array_pop(static::$stack);
74 74
75 if (!static::$stack) { 75 if (! static::$stack) {
76 restore_error_handler(); 76 restore_error_handler();
77 } 77 }
78 78
79 if ($errorException && $throw) { 79 if ($errorException && $throw) {
80 throw $errorException; 80 throw $errorException;