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

fix typo #641

Closed
wants to merge 1 commit into from
Closed

fix typo #641

wants to merge 1 commit into from

Conversation

staabm
Copy link
Contributor

@staabm staabm commented Aug 26, 2020

strpos expects args in the order $haystack, $needle.

additionally strpos can never return -1 but will return false when nothing can be found.

@guilliamxavier
Copy link
Contributor

The fix is correct, but actually this block is dead code (see #234 (comment), "[it] was simply merged in error after the problem was already solved"), so it should probably be deleted (in a second commit)

/ping @erayd

@DannyvdSluijs
Copy link
Collaborator

Looking into the comment from @guilliamxavier he is correct. The "typo" was introduced in ffc856d on 18/02/2016 whereas in 6474265 on 03/03/2016 the calling code of the validateDateTime with an format argument containing an u was removed making this check void. So removing the code block would be best.

@staabm thank you very much for your efforts though. Sadly the PR was never followed up. In an attempt to cleanup this repo we are trying to filter the issues and see which ones might be closed. Based on the above conclusion is it safe to assume this can be closed? Feel free to close it yourself with some comments if helpful. A new PR #710 was just created to remove the dead code.

@staabm
Copy link
Contributor Author

staabm commented Feb 12, 2024

Thank you guys for the analysis

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.

None yet

3 participants