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

[5.2] Fix return type of some validation methods #14373

Merged
merged 2 commits into from
Jul 19, 2016
Merged

[5.2] Fix return type of some validation methods #14373

merged 2 commits into from
Jul 19, 2016

Conversation

themsaid
Copy link
Member

@themsaid themsaid commented Jul 19, 2016

preg_match() returns an integer (1 || 0) while the method should return a bool.

@GrahamCampbell
Copy link
Member

Shouldn't be looking for > 0?

@themsaid
Copy link
Member Author

It doesn't return the count of matches, just 1 or 0;

@themsaid
Copy link
Member Author

maybe use (bool) preg_match(... ?

@GrahamCampbell
Copy link
Member

I think > 0 makes the most sense to do.

@taylorotwell taylorotwell merged commit 83d3ce2 into laravel:5.2 Jul 19, 2016
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.

3 participants