[buddypress-trac] [BuddyPress Trac] #6252: bp_core_referrer() not returning leading slash

buddypress-trac noreply at wordpress.org
Wed Feb 25 14:19:13 UTC 2015


#6252: bp_core_referrer() not returning leading slash
-------------------------------------+--------------------
 Reporter:  mechter                  |       Owner:
     Type:  defect (bug)             |      Status:  new
 Priority:  normal                   |   Milestone:  2.3
Component:  API                      |     Version:  2.2.1
 Severity:  normal                   |  Resolution:
 Keywords:  has-patch needs-testing  |
-------------------------------------+--------------------

Comment (by boonebgorges):

 Replying to [comment:4 mechter]:
 > That would fix the issue but leave the code buggy. Perhaps we could add
 `bp_core_referrer_path()` which correctly returns the leading slash and
 deprecate `bp_core_referrer()`? The new name would reflect that a path is
 being returned rather than complete referrer information.

 I like the idea of deprecating the function, as developers should probably
 be warned not to rely on it. I'm on the fence about having a function to
 replace it - I'm not crazy about having one-use functions like this,
 especially when the use case (wanting a schemeless version of the referer)
 is so specific to `bp_core_set_uri_globals()`. That being said, I would
 like to be able to write unit tests for it, which suggests that a separate
 function would be best. Thanks for weighing in.

--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/6252#comment:5>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac


More information about the buddypress-trac mailing list