[wp-trac] [WordPress Trac] #41480: filter_var() is not working below php 5.2 version

WordPress Trac noreply at wordpress.org
Sat Jul 29 11:57:19 UTC 2017


#41480: filter_var() is not working below php 5.2 version
--------------------------------+------------------------------
 Reporter:  umangvaghela123     |       Owner:
     Type:  defect (bug)        |      Status:  new
 Priority:  normal              |   Milestone:  Awaiting Review
Component:  External Libraries  |     Version:
 Severity:  normal              |  Resolution:
 Keywords:  close               |     Focuses:
--------------------------------+------------------------------
Changes (by SergeyBiryukov):

 * keywords:   => close
 * component:  General => External Libraries


Comment:

 Hi @umangvaghela123, thanks for the ticket!

 [https://github.com/PHPMailer/PHPMailer PHPMailer] is an external library,
 WordPress functions cannot be used there.

 [http://php.net/manual/en/function.filter-var.php filter_var()] appeared
 in PHP 5.2.0, but [https://wordpress.org/about/requirements/ WordPress
 requires PHP 5.2.4+] (and recommends PHP 7 or greater).

 Do you have an environment with PHP 5.2.4 or greater where `filter_var()`
 does not work? Why would you need `class-phpmailer.php` to work on PHP
 below 5.2.0?

--
Ticket URL: <https://core.trac.wordpress.org/ticket/41480#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list