WordPress.org

Make WordPress Core

Changeset 21299


Ignore:
Timestamp:
07/21/12 20:24:21 (21 months ago)
Author:
nacin
Message:

Revert [21287] until #21169 goes through. see #21321.

File:
1 edited

Legend:

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

    r21288 r21299  
    168168 
    169169    do { 
    170         foreach( (array) current($wp_filter[$tag]) as $the_ ) { 
    171             $args[1] = $value; 
    172             $value = call_user_func_array($the_['function'], array_slice($args, 1, (int) $the_['accepted_args'])); 
    173         } 
     170        foreach( (array) current($wp_filter[$tag]) as $the_ ) 
     171            if ( !is_null($the_['function']) ){ 
     172                $args[1] = $value; 
     173                $value = call_user_func_array($the_['function'], array_slice($args, 1, (int) $the_['accepted_args'])); 
     174            } 
     175 
    174176    } while ( next($wp_filter[$tag]) !== false ); 
    175177 
     
    224226 
    225227    do { 
    226         foreach( (array) current($wp_filter[$tag]) as $the_ ) { 
    227             $args[0] = call_user_func_array($the_['function'], array_slice($args, 0, (int) $the_['accepted_args'])); 
    228         } 
     228        foreach( (array) current($wp_filter[$tag]) as $the_ ) 
     229            if ( !is_null($the_['function']) ) 
     230                $args[0] = call_user_func_array($the_['function'], array_slice($args, 0, (int) $the_['accepted_args'])); 
     231 
    229232    } while ( next($wp_filter[$tag]) !== false ); 
    230233 
     
    264267        if ( empty($GLOBALS['wp_filter'][$tag][$priority]) ) 
    265268            unset($GLOBALS['wp_filter'][$tag][$priority]); 
    266         if ( empty( $GLOBALS['wp_filter'][ $tag ] ) ) 
    267             unset( $GLOBALS['wp_filter'][ $tag ] ); 
    268269        unset($GLOBALS['merged_filters'][$tag]); 
    269270    } 
     
    401402 
    402403    do { 
    403         foreach ( (array) current($wp_filter[$tag]) as $the_ ) { 
    404             call_user_func_array($the_['function'], array_slice($args, 0, (int) $the_['accepted_args'])); 
    405         } 
     404        foreach ( (array) current($wp_filter[$tag]) as $the_ ) 
     405            if ( !is_null($the_['function']) ) 
     406                call_user_func_array($the_['function'], array_slice($args, 0, (int) $the_['accepted_args'])); 
     407 
    406408    } while ( next($wp_filter[$tag]) !== false ); 
    407409 
     
    481483 
    482484    do { 
    483         foreach( (array) current($wp_filter[$tag]) as $the_ ) { 
    484             call_user_func_array($the_['function'], array_slice($args, 0, (int) $the_['accepted_args'])); 
    485         } 
     485        foreach( (array) current($wp_filter[$tag]) as $the_ ) 
     486            if ( !is_null($the_['function']) ) 
     487                call_user_func_array($the_['function'], array_slice($args, 0, (int) $the_['accepted_args'])); 
     488 
    486489    } while ( next($wp_filter[$tag]) !== false ); 
    487490 
     
    712715    reset( $wp_filter['all'] ); 
    713716    do { 
    714         foreach( (array) current($wp_filter['all']) as $the_ ) { 
    715             call_user_func_array($the_['function'], $args); 
    716         } 
     717        foreach( (array) current($wp_filter['all']) as $the_ ) 
     718            if ( !is_null($the_['function']) ) 
     719                call_user_func_array($the_['function'], $args); 
     720 
    717721    } while ( next($wp_filter['all']) !== false ); 
    718722} 
Note: See TracChangeset for help on using the changeset viewer.