comparison vendor/symfony/debug/ErrorHandler.php @ 16:c2387f117808

Routine composer update
author Chris Cannam
date Tue, 10 Jul 2018 15:07:59 +0100
parents 5fb285c0d0e3
children 129ea1e6d783
comparison
equal deleted inserted replaced
15:e200cb7efeb3 16:c2387f117808
381 * @internal 381 * @internal
382 */ 382 */
383 public function handleError($type, $message, $file, $line) 383 public function handleError($type, $message, $file, $line)
384 { 384 {
385 // Level is the current error reporting level to manage silent error. 385 // Level is the current error reporting level to manage silent error.
386 $level = error_reporting();
387 $silenced = 0 === ($level & $type);
386 // Strong errors are not authorized to be silenced. 388 // Strong errors are not authorized to be silenced.
387 $level = error_reporting() | E_RECOVERABLE_ERROR | E_USER_ERROR | E_DEPRECATED | E_USER_DEPRECATED; 389 $level |= E_RECOVERABLE_ERROR | E_USER_ERROR | E_DEPRECATED | E_USER_DEPRECATED;
388 $log = $this->loggedErrors & $type; 390 $log = $this->loggedErrors & $type;
389 $throw = $this->thrownErrors & $type & $level; 391 $throw = $this->thrownErrors & $type & $level;
390 $type &= $level | $this->screamedErrors; 392 $type &= $level | $this->screamedErrors;
391 393
392 if (!$type || (!$log && !$throw)) { 394 if (!$type || (!$log && !$throw)) {
393 return $type && $log; 395 return !$silenced && $type && $log;
394 } 396 }
395 $scope = $this->scopedErrors & $type; 397 $scope = $this->scopedErrors & $type;
396 398
397 if (4 < $numArgs = func_num_args()) { 399 if (4 < $numArgs = func_num_args()) {
398 $context = $scope ? (func_get_arg(4) ?: array()) : array(); 400 $context = $scope ? (func_get_arg(4) ?: array()) : array();
522 } finally { 524 } finally {
523 $this->isRecursive = false; 525 $this->isRecursive = false;
524 } 526 }
525 } 527 }
526 528
527 return $type && $log; 529 return !$silenced && $type && $log;
528 } 530 }
529 531
530 /** 532 /**
531 * Handles an exception by logging then forwarding it to another handler. 533 * Handles an exception by logging then forwarding it to another handler.
532 * 534 *