Behat / Gherkin

Gherkin parser, written in PHP for Behat project
MIT License
1.05k stars 89 forks source link

TagFilter not checking for empty string #250

Closed magikid closed 11 months ago

magikid commented 2 years ago

When I run behat --tags="" then I expect no exceptions to be thrown. In the version of behat that I'm running (3.8.1), it throws the following exception:

$ behat --tags="" --list-scenarios

In TagFilter.php line 146:

  Warning: Uninitialized string offset 0  

It looks like TagFilter doesn't check for the empty string before exploding the string and attempting to use array access on it.