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

WordPress Trac noreply at wordpress.org
Wed Oct 18 22:56:48 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):

 Overall, [attachment:41083.diff] looks good to me at first glance, thanks
 @pento! I should have some time tomorrow to take a closer look and run
 through some manual tests.

 ----

 Replying to [comment:32 dd32]:

 >>> would be better if the method returned false?
 >> The original behaviour was to return the full IP address
 > it seems to be erring on the better side of UX.

 That's correct as far as I can remember. It's best if we can provide
 automatic locations for as many people as possible, so that the feature
 instantly works without any effort on their part.

 If anyone wants to be fully anonymous in all cases, we anticipated that
 and released [https://wordpress.org/plugins/community-events-privacy/ a
 plugin] to make that easy for them.

 [attachment:41083.3.diff] did `return false` if the ''address format''
 couldn't be detected, but that was just a sanity check, since in that case
 we've encountered an unhandled edge case and don't know how to recover.

 ----

 Replying to [comment:29 pento]:
 > I also moved everything back into the single method, because all this
 code is really only being used in this one place.

 I wasn't really concerned with reuse. Mostly it just seemed like the
 modularity made it much more readable and clear than doing 4 distinct
 tasks in one large function. I'm happy to defer to your judgement, though.

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


More information about the wp-trac mailing list