Return false from wp_get_referer() if it is called before wp_validate_redirect() is defined.
see #25294. git-svn-id: https://develop.svn.wordpress.org/trunk@25399 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
3ae18e68ff
commit
cc5477c7d9
|
@ -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'] );
|
||||
|
|
Loading…
Reference in New Issue