Skip to content

Commit 81ce41b

Browse files
committed
Fix php-curl-class#724: Remove filter flag constants deprecated as of PHP 7.3
Error messages: Fatal error: Uncaught Error: Undefined constant "FILTER_FLAG_SCHEME_REQUIRED" in [...] Fatal error: Uncaught Error: Undefined constant "FILTER_FLAG_HOST_REQUIRED" in [...]
1 parent f458bf6 commit 81ce41b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

SECURITY.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Safer:
2222

2323
```php
2424
function is_allowed_url($url, $allowed_url_schemes = ['http', 'https']) {
25-
$valid_url = filter_var($url, FILTER_VALIDATE_URL, FILTER_FLAG_SCHEME_REQUIRED | FILTER_FLAG_HOST_REQUIRED) !== false;
25+
$valid_url = filter_var($url, FILTER_VALIDATE_URL) !== false;
2626
if ($valid_url) {
2727
$scheme = parse_url($url, PHP_URL_SCHEME);
2828
return in_array($scheme, $allowed_url_schemes, true);

0 commit comments

Comments
 (0)