Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit cbeb5be

Browse files
committed
fix strpos empty needle
1 parent b814750 commit cbeb5be

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

‎src/Handler/SpecHandler/Comparer/ContainsComparer.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ public function compare(?string $pattern, ?string $actual): bool
1414
if (is_null($pattern) || is_null($actual)) {
1515
return false;
1616
}
17+
if ($pattern === '') {
18+
return true;
19+
}
1720
return strpos($actual, $pattern) !== false;
1821
}
1922
}

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /