Skip to content

Commit 1c02496

Browse files
committed
chore: remove unnecessary if check
1 parent 7109931 commit 1c02496

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

system/HTTP/Negotiate.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ public function parseHeader(string $header): array
274274
protected function match(array $acceptable, string $supported, bool $enforceTypes = false, $matchLocales = false): bool
275275
{
276276
$supported = $this->parseHeader($supported);
277-
if (is_array($supported) && count($supported) === 1) {
277+
if (count($supported) === 1) {
278278
$supported = $supported[0];
279279
}
280280

system/Helpers/form_helper.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -456,10 +456,8 @@ function form_label(string $labelText = '', string $id = '', array $attributes =
456456
$label .= ' for="' . $id . '"';
457457
}
458458

459-
if (is_array($attributes) && $attributes) {
460-
foreach ($attributes as $key => $val) {
461-
$label .= ' ' . $key . '="' . $val . '"';
462-
}
459+
foreach ($attributes as $key => $val) {
460+
$label .= ' ' . $key . '="' . $val . '"';
463461
}
464462

465463
return $label . '>' . $labelText . '</label>';

0 commit comments

Comments
 (0)