Skip to content

Commit

Permalink
Fix "PHP Warning: Uninitialized string offset 0"
Browse files Browse the repository at this point in the history
  • Loading branch information
staabm authored and sebastianbergmann committed Apr 14, 2024
1 parent 741f67f commit 75709ca
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Metadata/Api/DataProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ private function dataProvidedByTestWithAnnotation(string $className, string $met
foreach (explode("\n", $annotationContent) as $candidateRow) {
$candidateRow = trim($candidateRow);

if ($candidateRow[0] !== '[') {
if ($candidateRow === '' || $candidateRow[0] !== '[') {
break;
}

Expand Down

0 comments on commit 75709ca

Please sign in to comment.