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.6] Fix URL validation pattern #25194

Merged
merged 1 commit into from
Aug 13, 2018
Merged

[5.6] Fix URL validation pattern #25194

merged 1 commit into from
Aug 13, 2018

Conversation

staudenmeir
Copy link
Contributor

When running the Laravel tests with PHP 7.3.0beta1 on Windows, testValidateUrlWithValidUrls() fails with an exception:

preg_match(): Compilation failed: invalid range in character class at offset 1828

The hyphen has to be escaped:
https://stackoverflow.com/q/26208622/4848587
https://stackoverflow.com/q/24764212/4848587

Apparently, this pattern has always been invalid, PHP just never complained.

This is the Symfony fix (where the pattern is from): symfony/validator@ea91e49

@n3b0r
Copy link

n3b0r commented May 11, 2020

Happens the same whit Laravel 5.4 + PHP 7.3.

I think that it will be useful for someone.

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