[wp-trac] [WordPress Trac] #57670: Invalid return type for wp_get_raw_referer()

WordPress Trac noreply at wordpress.org
Sun May 14 14:20:32 UTC 2023


#57670: Invalid return type for wp_get_raw_referer()
--------------------------------------------+--------------------------
 Reporter:  xknown                          |       Owner:  johnbillion
     Type:  defect (bug)                    |      Status:  accepted
 Priority:  normal                          |   Milestone:  6.3
Component:  General                         |     Version:  4.6
 Severity:  normal                          |  Resolution:
 Keywords:  php81 has-patch has-unit-tests  |     Focuses:
--------------------------------------------+--------------------------

Comment (by costdev):

 Thanks @xknown!

 My understanding is that `_wp_http_referer`, like `HTTP_REFERER`, should
 always be a string. I haven't found any references to it being acceptable
 or used as an array.

 So if the issue is just that `wp_get_referer()` isn't enforcing its
 documented return types, then the PR looks good to me! - I just left a
 comment with a small change to the test method's name.

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


More information about the wp-trac mailing list