diff --git a/src/wp-includes/functions.php b/src/wp-includes/functions.php index 8ca7da28af..8cd4af4f68 100644 --- a/src/wp-includes/functions.php +++ b/src/wp-includes/functions.php @@ -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; }