Return false from wp_get_original_referer() if it is called before wp_validate_redirect() is defined.
see #25294. Built from https://develop.svn.wordpress.org/trunk@25400 git-svn-id: http://core.svn.wordpress.org/trunk@25331 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
46611d4282
commit
4542e678d2
|
@ -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