Skip to content

Commit eaa74a8

Browse files
committed
add null coalescing
1 parent d11dc77 commit eaa74a8

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/Core/System.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -530,7 +530,7 @@ public function health($info) : array
530530

531531
try {
532532
$core_version = InstalledVersions::getVersion('typerocket/core');
533-
} catch (\Throwable $e) {
533+
} catch (\Throwable) {
534534
$core_version = __('Another plugin is blocking this information.', 'typerocket-core');
535535
}
536536

src/Elements/Fields/Matrix.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,7 @@ public static function componentTemplate($component, $group, $classes = '')
359359
}
360360

361361
$controls_html = array_reduce($group_control_list, function($carry, $item) {
362-
$el = isset($item[0]) ? $item[0] : 'a';
362+
$el = $item[0] ?? 'a';
363363
unset($item[0]);
364364
return $carry . Html::el( $el, $item);
365365
});

src/Elements/Fields/Repeater.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ public function getString()
108108
}
109109

110110
$controls_html = array_reduce($group_control_list, function($carry, $item) {
111-
$el = isset($item[0]) ? $item[0] : 'a';
111+
$el = $item[0] ?? 'a';
112112
unset($item[0]);
113113
return $carry . Html::el( $el, $item);
114114
});

0 commit comments

Comments
 (0)