Skip to content

Commit 4ed5733

Browse files
committed
Filter out empty values sooner
1 parent 792cf66 commit 4ed5733

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

src/Config.php

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1654,16 +1654,11 @@ private function parseSniffCodes($input, $argument)
16541654
$errors = [];
16551655
$sniffs = [];
16561656

1657-
$possibleSniffs = explode(',', $input);
1657+
$possibleSniffs = array_filter(explode(',', $input));
16581658

16591659
foreach ($possibleSniffs as $sniff) {
16601660
$sniff = trim($sniff);
16611661

1662-
if ($sniff === '') {
1663-
// Empty values can be safely ignored.
1664-
continue;
1665-
}
1666-
16671662
if (preg_match('{[^A-Za-z0-9.]}', $sniff) === 1) {
16681663
$errors[] = 'Unsupported character detected: '.$sniff;
16691664
continue;

0 commit comments

Comments
 (0)