WordPress.org

Make WordPress Core

Changeset 17068


Ignore:
Timestamp:
12/19/10 21:17:52 (3 years ago)
Author:
nacin
Message:

Don't fatal error when conditional tags are called before init. fixes #14729.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/query.php

    r16999 r17068  
    145145    if ( ! isset( $wp_query ) ) { 
    146146        _doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the init hook. They always return false.' ), '3.1' ); 
    147         // return false; 
     147        return false; 
    148148    } 
    149149 
     
    166166    if ( ! isset( $wp_query ) ) { 
    167167        _doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the init hook. They always return false.' ), '3.1' ); 
    168         // return false; 
     168        return false; 
    169169    } 
    170170 
     
    186186    if ( ! isset( $wp_query ) ) { 
    187187        _doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the init hook. They always return false.' ), '3.1' ); 
    188         // return false; 
     188        return false; 
    189189    } 
    190190 
     
    210210    if ( ! isset( $wp_query ) ) { 
    211211        _doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the init hook. They always return false.' ), '3.1' ); 
    212         // return false; 
     212        return false; 
    213213    } 
    214214 
     
    234234    if ( ! isset( $wp_query ) ) { 
    235235        _doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the init hook. They always return false.' ), '3.1' ); 
    236         // return false; 
     236        return false; 
    237237    } 
    238238 
     
    258258    if ( ! isset( $wp_query ) ) { 
    259259        _doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the init hook. They always return false.' ), '3.1' ); 
    260         // return false; 
     260        return false; 
    261261    } 
    262262 
     
    287287    if ( ! isset( $wp_query ) ) { 
    288288        _doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the init hook. They always return false.' ), '3.1' ); 
    289         // return false; 
     289        return false; 
    290290    } 
    291291 
     
    307307    if ( ! isset( $wp_query ) ) { 
    308308        _doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the init hook. They always return false.' ), '3.1' ); 
    309         // return false; 
     309        return false; 
    310310    } 
    311311 
     
    327327    if ( ! isset( $wp_query ) ) { 
    328328        _doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the init hook. They always return false.' ), '3.1' ); 
    329         // return false; 
     329        return false; 
    330330    } 
    331331 
     
    347347    if ( ! isset( $wp_query ) ) { 
    348348        _doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the init hook. They always return false.' ), '3.1' ); 
    349         // return false; 
     349        return false; 
    350350    } 
    351351 
     
    368368    if ( ! isset( $wp_query ) ) { 
    369369        _doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the init hook. They always return false.' ), '3.1' ); 
    370         // return false; 
     370        return false; 
    371371    } 
    372372 
     
    388388    if ( ! isset( $wp_query ) ) { 
    389389        _doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the init hook. They always return false.' ), '3.1' ); 
    390         // return false; 
     390        return false; 
    391391    } 
    392392 
     
    418418    if ( ! isset( $wp_query ) ) { 
    419419        _doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the init hook. They always return false.' ), '3.1' ); 
    420         // return false; 
     420        return false; 
    421421    } 
    422422 
     
    447447    if ( ! isset( $wp_query ) ) { 
    448448        _doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the init hook. They always return false.' ), '3.1' ); 
    449         // return false; 
     449        return false; 
    450450    } 
    451451 
     
    467467    if ( ! isset( $wp_query ) ) { 
    468468        _doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the init hook. They always return false.' ), '3.1' ); 
    469         // return false; 
     469        return false; 
    470470    } 
    471471 
     
    494494    if ( ! isset( $wp_query ) ) { 
    495495        _doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the init hook. They always return false.' ), '3.1' ); 
    496         // return false; 
     496        return false; 
    497497    } 
    498498 
     
    514514    if ( ! isset( $wp_query ) ) { 
    515515        _doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the init hook. They always return false.' ), '3.1' ); 
    516         // return false; 
     516        return false; 
    517517    } 
    518518 
     
    534534    if ( ! isset( $wp_query ) ) { 
    535535        _doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the init hook. They always return false.' ), '3.1' ); 
    536         // return false; 
     536        return false; 
    537537    } 
    538538 
     
    554554    if ( ! isset( $wp_query ) ) { 
    555555        _doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the init hook. They always return false.' ), '3.1' ); 
    556         // return false; 
     556        return false; 
    557557    } 
    558558 
     
    574574    if ( ! isset( $wp_query ) ) { 
    575575        _doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the init hook. They always return false.' ), '3.1' ); 
    576         // return false; 
     576        return false; 
    577577    } 
    578578 
     
    603603    if ( ! isset( $wp_query ) ) { 
    604604        _doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the init hook. They always return false.' ), '3.1' ); 
    605         // return false; 
     605        return false; 
    606606    } 
    607607 
     
    630630    if ( ! isset( $wp_query ) ) { 
    631631        _doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the init hook. They always return false.' ), '3.1' ); 
    632         // return false; 
     632        return false; 
    633633    } 
    634634 
     
    650650    if ( ! isset( $wp_query ) ) { 
    651651        _doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the init hook. They always return false.' ), '3.1' ); 
    652         // return false; 
     652        return false; 
    653653    } 
    654654 
     
    670670    if ( ! isset( $wp_query ) ) { 
    671671        _doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the init hook. They always return false.' ), '3.1' ); 
    672         // return false; 
     672        return false; 
    673673    } 
    674674 
     
    690690    if ( ! isset( $wp_query ) ) { 
    691691        _doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the init hook. They always return false.' ), '3.1' ); 
    692         // return false; 
     692        return false; 
    693693    } 
    694694 
     
    710710    if ( ! isset( $wp_query ) ) { 
    711711        _doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the init hook. They always return false.' ), '3.1' ); 
    712         // return false; 
     712        return false; 
    713713    } 
    714714 
Note: See TracChangeset for help on using the changeset viewer.