Return false from wp_get_referer() if it is called before wp_validate_redirect() is defined.
see #25294. Built from https://develop.svn.wordpress.org/trunk@25399 git-svn-id: http://core.svn.wordpress.org/trunk@25330 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
13d5ff7090
commit
46611d4282
|
@ -1303,6 +1303,8 @@ function wp_original_referer_field( $echo = true, $jump_back_to = 'current' ) {
|
||||||
* @return string|bool False on failure. Referer URL on success.
|
* @return string|bool False on failure. Referer URL on success.
|
||||||
*/
|
*/
|
||||||
function wp_get_referer() {
|
function wp_get_referer() {
|
||||||
|
if ( ! function_exists( 'wp_validate_redirect' ) )
|
||||||
|
return false;
|
||||||
$ref = false;
|
$ref = false;
|
||||||
if ( ! empty( $_REQUEST['_wp_http_referer'] ) )
|
if ( ! empty( $_REQUEST['_wp_http_referer'] ) )
|
||||||
$ref = wp_unslash( $_REQUEST['_wp_http_referer'] );
|
$ref = wp_unslash( $_REQUEST['_wp_http_referer'] );
|
||||||
|
|
Loading…
Reference in New Issue