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

buddypress-trac noreply at wordpress.org
Tue Feb 24 20:41:08 UTC 2015


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

Comment (by mechter):

 The patch should not cause any trouble.

 * `bp_core_referrer()` is called from only one place in trunk
 (`bp_core_set_uri_globals()`) and its return value is handled by exactly
 the same code that is handling the non-ajax leadling-slashed path
 `$_SERVER['REQUEST_URI']`.
 * All plugins using the following `bp_uri` hook must also handle the
 properly slashed path.
 * The path is generated using `explode()` and `implode()` with `'/'` as
 delimiter, thus the resulting string never contains a leading slash and it
 is save to simply prepend it.

 However, I have not yet checked whether it breaks unit tests.

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


More information about the buddypress-trac mailing list