WordPress.org

Make WordPress Core

Changeset 14690


Ignore:
Timestamp:
05/16/2010 08:10:39 AM (8 years ago)
Author:
westi
Message:

Fix notices/usage of closures as action/filter handlers. Fixes #10493 based on patch from scribu.

File:
1 edited

Legend:

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

    r13906 r14690  
    738738        return $function;
    739739
    740     $function = (array) $function;
    741 
     740    // Closures are currently implemented as objects
     741    if ( is_object($function) ) {
     742        $function = array( $function );
     743    } else {
     744        $function = (array) $function;
     745    }
     746   
    742747    if (is_object($function[0]) ) {
    743748        // Object Class Calling
Note: See TracChangeset for help on using the changeset viewer.