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

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

Closed
ankit20893 opened this issue Nov 4, 2019 · 6 comments

Comments

@ankit20893
Copy link

phpMyFAQ deprecated warning [8192]: filter_var(): explicit use of FILTER_FLAG_SCHEME_REQUIRED and FILTER_FLAG_HOST_REQUIRED is deprecated in /home/forge/faq.devnagri.com/phpmyfaq/src/libs/elasticsearch/src/Elasticsearch/ClientBuilder.php on line 686

Fatal error: Uncaught Elasticsearch\Common\Exceptions\NoNodesAvailableException: No alive nodes found in your cluster in /home/forge/faq.devnagri.com/phpmyfaq/src/libs/elasticsearch/src/Elasticsearch/ConnectionPool/StaticNoPingConnectionPool.php:51 Stack trace: #0 /home/forge/faq.devnagri.com/phpmyfaq/src/libs/elasticsearch/src/Elasticsearch/Transport.php(76): Elasticsearch\ConnectionPool\StaticNoPingConnectionPool->nextConnection() #1 /home/forge/faq.devnagri.com/phpmyfaq/src/libs/elasticsearch/src/Elasticsearch/Transport.php(94): Elasticsearch\Transport->getConnection() #2 /home/forge/faq.devnagri.com/phpmyfaq/src/libs/elasticsearch/src/Elasticsearch/Connections/Connection.php(242): Elasticsearch\Transport->performRequest('GET', '/phpmyfaq/faqs/...', Array, '{"query":{"bool...', Array) #3 /home/forge/faq.devnagri.com/phpmyfaq/src/libs/react/promise/src/FulfilledPromise.php(25): Elasticsearch\Connections\Connection->Elasticsearch\Connections{closure}(Array) #4 /home/forge/faq.devnagri.com/phpmyfaq/src/libs/guzzlehttp/ri in /home/forge/faq.devnagri.com/phpmyfaq/src/libs/elasticsearch/src/Elasticsearch/ConnectionPool/StaticNoPingConnectionPool.php on line 51

@ankit20893 ankit20893 changed the title ilter_var(): explicit use of FILTER_FLAG_SCHEME_REQUIRED and FILTER_FLAG_HOST_REQUIRED is deprecated filter_var(): explicit use of FILTER_FLAG_SCHEME_REQUIRED and FILTER_FLAG_HOST_REQUIRED is deprecated Nov 4, 2019
@thorsten
Copy link
Owner

thorsten commented Nov 4, 2019

-> depends on 3rd party ES library

Which version do you use?

@ankit20893
Copy link
Author

ankit20893 commented Nov 4, 2019 via email

@thorsten
Copy link
Owner

thorsten commented Nov 5, 2019

And which version of phpMyFAQ?

@ankit20893
Copy link
Author

ankit20893 commented Nov 5, 2019 via email

@thorsten thorsten added this to To Do in 3.0.0-beta.3 via automation Nov 9, 2019
@thorsten thorsten added this to the 3.0 milestone Nov 9, 2019
@thorsten thorsten moved this from To Do to Done in 3.0.0-beta.3 Nov 9, 2019
@Ayesh
Copy link

Ayesh commented Dec 14, 2019

Since PHP 7.3, these warnings are throws because these two flags were already implied when you validate the URL. See https://php.watch/versions/7.3/filter-var-flag-deprecation

You can simply get rid of these warnings by removing the FILTER_FLAG_SCHEME_REQUIRED and FILTER_FLAG_HOST_REQUIRED because there were already being enforced since PHP 5.1.

@thorsten
Copy link
Owner

The error comes from a bundled third party library.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
3.0.0-beta.3
  
Done
Development

No branches or pull requests

3 participants