Skip to content

Conversation

@nicoder
Copy link

@nicoder nicoder commented Jul 8, 2020

fixes issue greenlion#320

a warning was issued in PositionCalculator#findPositionWithinString
when calling strpos on an empty value:

Warning: strpos(): Empty needle in
src/PHPSQLParser/positions/PositionCalculator.php on line 138

=> return false earlier in that case, to then throw an exception

nicoder added 2 commits June 17, 2020 16:36
fixes issue greenlion#320

a warning was issued in `PositionCalculator#findPositionWithinString`
when calling `strpos` on an empty value:

```
Warning: strpos(): Empty needle in
src/PHPSQLParser/positions/PositionCalculator.php on line 138
```

=> return `false` earlier in that case, to then throw an exception
PHP Parse error:  syntax error, unexpected 'class' (T_CLASS), expecting
identifier (T_STRING) or variable (T_VARIABLE) or '{' or '$' in
/home/travis/build/greenlion/PHP-SQL-Parser/tests/cases/parser/issue320Test.php
on line 55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant