Skip to content

Commit 02429d1

Browse files
Merge branch '10.5' into 11.3
2 parents 17bbefa + 2bfcd91 commit 02429d1

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Runner/Filter/NameFilterIterator.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
use function preg_match;
1414
use function sprintf;
1515
use function str_replace;
16+
use function substr;
1617
use PHPUnit\Framework\Test;
1718
use PHPUnit\Framework\TestSuite;
1819
use PHPUnit\Runner\PhptTestCase;
@@ -84,7 +85,7 @@ private function prepareFilter(string $filter): array
8485
$dataSetMinimum = null;
8586
$dataSetMaximum = null;
8687

87-
if (@preg_match($filter, '') === false) {
88+
if (preg_match('/[a-zA-Z0-9]/', substr($filter, 0, 1)) === 1 || @preg_match($filter, '') === false) {
8889
// Handles:
8990
// * testAssertEqualsSucceeds#4
9091
// * testAssertEqualsSucceeds#4-8

0 commit comments

Comments
 (0)