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

WordPress Trac noreply at wordpress.org
Sat Jul 29 13:31:23 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:
--------------------------------+------------------------------

Comment (by SergeyBiryukov):

 Replying to [comment:3 umangvaghela123]:
 > If we include the class-phpmailer.php in wordpress environment so it is
 fine we use own default wordpress function.

 We wouldn't want to make changes to the original file though, unless
 absolutely necessary, as that makes it harder to maintain the file in the
 future.
 >
 > issue #40353 @swissspidy comment for this bug.
 >
 > As mentioned earlier in the ticket, filter_var() can't be used because
 it could be turned off in PHP 5.2.

 It could, but WordPress shouldn't ever hit that branch of code, as
 `$patternselect` [source:tags/4.8/src/wp-includes/class-
 phpmailer.php#L1080 defaults to pcre8 or pcre] if PCRE is available. If
 PCRE is not available, I don't think WordPress would work at all :)

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


More information about the wp-trac mailing list