Make WordPress Core


Ignore:
Timestamp:
09/12/2013 01:38:42 PM (11 years ago)
Author:
nacin
Message:

Return false from wp_get_referer() and wp_get_original_referer() if called before wp_validate_redirect() is defined.

Merges [25399] and [25400] to the 3.6 branch.
see #25294.

Location:
branches/3.6
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/3.6

  • branches/3.6/wp-includes/functions.php

    r25345 r25401  
    12961296 */
    12971297function wp_get_referer() {
     1298    if ( ! function_exists( 'wp_validate_redirect' ) )
     1299        return false;
    12981300    $ref = false;
    12991301    if ( ! empty( $_REQUEST['_wp_http_referer'] ) )
     
    13171319 */
    13181320function wp_get_original_referer() {
    1319     if ( !empty( $_REQUEST['_wp_original_http_referer'] ) )
     1321    if ( ! empty( $_REQUEST['_wp_original_http_referer'] ) && function_exists( 'wp_validate_redirect' ) )
    13201322        return wp_validate_redirect( wp_unslash( $_REQUEST['_wp_original_http_referer'] ), false );
    13211323    return false;
Note: See TracChangeset for help on using the changeset viewer.