Return false from wp_get_original_referer() if it is called before wp_validate_redirect() is defined.
see #25294. git-svn-id: https://develop.svn.wordpress.org/trunk@25400 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
cc5477c7d9
commit
1851da1382
@ -1326,7 +1326,7 @@ function wp_get_referer() {
|
||||
* @return string|bool False if no original referer or original referer if set.
|
||||
*/
|
||||
function wp_get_original_referer() {
|
||||
if ( !empty( $_REQUEST['_wp_original_http_referer'] ) )
|
||||
if ( ! empty( $_REQUEST['_wp_original_http_referer'] ) && function_exists( 'wp_validate_redirect' ) )
|
||||
return wp_validate_redirect( wp_unslash( $_REQUEST['_wp_original_http_referer'] ), false );
|
||||
return false;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user