Skip to content

Commit 8ae17a4

Browse files
committed
Merge branch '4.4' into 5.1
* 4.4: CS: Apply ternary_to_null_coalescing fixer
2 parents cd4b46e + 94ae14e commit 8ae17a4

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

ErrorHandler.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -665,7 +665,7 @@ public static function handleFatalError(array $error = null): void
665665
if ($error && $error['type'] &= \E_PARSE | \E_ERROR | \E_CORE_ERROR | \E_COMPILE_ERROR) {
666666
// Let's not throw anymore but keep logging
667667
$handler->throwAt(0, true);
668-
$trace = isset($error['backtrace']) ? $error['backtrace'] : null;
668+
$trace = $error['backtrace'] ?? null;
669669

670670
if (0 === strpos($error['message'], 'Allowed memory') || 0 === strpos($error['message'], 'Out of memory')) {
671671
$fatalError = new OutOfMemoryError($handler->levels[$error['type']].': '.$error['message'], 0, $error, 2, false, $trace);

Exception/FlattenException.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -300,11 +300,11 @@ public function setTrace($trace, $file, $line): self
300300
$this->trace[] = [
301301
'namespace' => $namespace,
302302
'short_class' => $class,
303-
'class' => isset($entry['class']) ? $entry['class'] : '',
304-
'type' => isset($entry['type']) ? $entry['type'] : '',
305-
'function' => isset($entry['function']) ? $entry['function'] : null,
306-
'file' => isset($entry['file']) ? $entry['file'] : null,
307-
'line' => isset($entry['line']) ? $entry['line'] : null,
303+
'class' => $entry['class'] ?? '',
304+
'type' => $entry['type'] ?? '',
305+
'function' => $entry['function'] ?? null,
306+
'file' => $entry['file'] ?? null,
307+
'line' => $entry['line'] ?? null,
308308
'args' => isset($entry['args']) ? $this->flattenArgs($entry['args']) : [],
309309
];
310310
}

0 commit comments

Comments
 (0)