Make WordPress Core

Ticket #10493: closures.2.diff

File closures.2.diff, 742 bytes (added by scribu, 16 years ago)

updated patch

  • wp-includes/plugin.php

     
    675675        global $wp_filter;
    676676        static $filter_id_count = 0;
    677677
    678         if ( is_string($function) ) {
     678        if ( is_string($function) )
    679679                return $function;
    680         } else if (is_object($function[0]) ) {
     680
     681        $function = (array) $function;
     682
     683        if (is_object($function[0]) ) {
    681684                // Object Class Calling
    682685                if ( function_exists('spl_object_hash') ) {
    683686                        return spl_object_hash($function[0]) . $function[1];
     
    692695                        } else {
    693696                                $obj_idx .= $function[0]->wp_filter_id;
    694697                        }
    695        
     698
    696699                        return $obj_idx;
    697700                }
    698701        } else if ( is_string($function[0]) ) {