From 46611d42829c2438beb075629689dd50ebf1e4a7 Mon Sep 17 00:00:00 2001 From: Andrew Nacin Date: Thu, 12 Sep 2013 13:33:09 +0000 Subject: [PATCH] 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 --- wp-includes/functions.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/wp-includes/functions.php b/wp-includes/functions.php index d957595e92..8ca7da28af 100644 --- a/wp-includes/functions.php +++ b/wp-includes/functions.php @@ -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. */ function wp_get_referer() { + if ( ! function_exists( 'wp_validate_redirect' ) ) + return false; $ref = false; if ( ! empty( $_REQUEST['_wp_http_referer'] ) ) $ref = wp_unslash( $_REQUEST['_wp_http_referer'] );