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

PHP 7.3, "filter_var(): explicit use of FILTER_FLAG_SCHEME_REQUIRED and FILTER_FLAG_HOST_REQUIRED is deprecated" #1572

Closed
KiddoKenshin opened this issue Oct 12, 2018 · 8 comments

Comments

@KiddoKenshin
Copy link

Problem description

PHP 7.3 (Release Candidate 3),
PHPMailer->send() causes "filter_var(): explicit use of FILTER_FLAG_SCHEME_REQUIRED and FILTER_FLAG_HOST_REQUIRED is deprecated"

Code to reproduce

use PHP 7.3, PHPMailer->send();

Debug output

filter_var(): explicit use of FILTER_FLAG_SCHEME_REQUIRED and FILTER_FLAG_HOST_REQUIRED is deprecated

Reference

https://wiki.php.net/rfc/deprecations_php_7_3#filter_flag_scheme_required_and_filter_flag_host_required

@Synchro
Copy link
Member

Synchro commented Oct 12, 2018

Already fixed in master

@Synchro Synchro closed this as completed Oct 12, 2018
@silviodelgado
Copy link

silviodelgado commented Mar 17, 2019

This error is also shown to me when I send an email.

@Synchro
Copy link
Member

Synchro commented Mar 17, 2019

Like the thread already says, this has been fixed. Update your PHPMailer.

@silviodelgado
Copy link

My version is the last stable (6.0.7) and the problem are still there.

@Synchro
Copy link
Member

Synchro commented Mar 18, 2019

The FILTER_FLAG_SCHEME_REQUIRED constant is not used anywhere in the current release. Double-check your versions.

@silviodelgado
Copy link

Sorry for my complain.
My VSCode cache from Github was keeping the old code, instead of update it (even after composer.json update)

@mjkatgithub
Copy link

mjkatgithub commented Oct 16, 2020

Sorry for my complain.
My VSCode cache from Github was keeping the old code, instead of update it (even after composer.json update)

in my composer.json is

"phpmailer/phpmailer": "v6.1.7",

how did you force composer to use the new version?

well, and we use php 7.4

@Synchro
Copy link
Member

Synchro commented Oct 16, 2020

Change your composer.json to:

"phpmailer/phpmailer": "^6.1",

Then update (just PHPMailer) using composer update phpmailer/phpmailer. This pattern will match semver numbering and will get the latest version of PHPMailer 6.x.x, currently 6.1.8.

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

4 participants