[wp-trac] [WordPress Trac] #41083: IP with port number triggers warnings in WP_Community_Events

WordPress Trac noreply at wordpress.org
Thu Oct 19 23:50:15 UTC 2017


#41083: IP with port number triggers warnings in WP_Community_Events
--------------------------------------+-----------------------------
 Reporter:  EatonZ                    |       Owner:  iandunn
     Type:  defect (bug)              |      Status:  assigned
 Priority:  normal                    |   Milestone:  4.9
Component:  Administration            |     Version:  4.8
 Severity:  normal                    |  Resolution:
 Keywords:  has-patch has-unit-tests  |     Focuses:  administration
--------------------------------------+-----------------------------

Comment (by iandunn):

 > just short-circuit the function for IPv4 addresses and use direct string
 manipulation, to avoid those kind of issues.

 That's a good point to bring up. I tested that out in
 [attachment:41083.6.diff]. @dd32, does that look like what you were
 picturing? (I played around with some alternate flows where there was an
 actual early return for IPv4 addresses, but they felt less intuitive and
 readable.)

 Overall, the two approaches seem pretty similar to me, in terms of
 validity. I can imagine people favoring one over the other, but just as a
 personal preference. I'm not seeing anything that's objectively better
 about one or the other.

 Given that, I'm inclined to go with the "short-circuit" approach in
 [attachment:41083.6.diff], since it does have the added benefit of
 maintaining the anonymization for installs running the latest version of
 WP on PHP 5.2 on Windows (a tiny percent, but not nothing in absolute
 numbers).

 Dion, if that patch looks good to you, and @pento doesn't have any
 objections, then I'll go ahead and do some final testing and get it
 committed in time for `4.9-beta4` on Monday.

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


More information about the wp-trac mailing list