Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with is_compound on index 0 #34

Open
krlnwll opened this issue Mar 1, 2017 · 2 comments
Open

Issue with is_compound on index 0 #34

krlnwll opened this issue Mar 1, 2017 · 2 comments

Comments

@krlnwll
Copy link
Contributor

krlnwll commented Mar 1, 2017

array_search will return 0 if the match is the first word, should be changed to in_array

Before:
protected function is_compound($word) {
return array_search(mb_strtolower($word), $this->dict['compound']);
}

After:
protected function is_compound($word) {
return in_array(mb_strtolower($word), $this->dict['compound']);
}

@joshfraser
Copy link
Owner

Mind sending this as a pull request?

@krlnwll
Copy link
Contributor Author

krlnwll commented Mar 1, 2017

I could, I would need to create a new fork and rename my original, as I made a bunch of specific changes for my use case.

krlnwll added a commit to krlnwll/PHP-Name-Parser that referenced this issue Mar 2, 2017
joshfraser added a commit that referenced this issue Mar 2, 2017
Fix to issue #34 to account for index 0 of the array
aait pushed a commit to aait/PHP-Name-Parser that referenced this issue Oct 19, 2017
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

No branches or pull requests

2 participants