Ticket #708: class-IXR.php.patch

File class-IXR.php.patch, 1.1 KB (added by ringmaster, 7 years ago)
  • wp-includes/class-IXR.php

    RCS file: /cvsroot/cafelog/wordpress/wp-includes/class-IXR.php,v
    retrieving revision 1.3
    diff -u -r1.3 class-IXR.php
     
    344344            $result = $this->$method($args); 
    345345        } else { 
    346346            // It's a function - does it exist? 
    347             if (!function_exists($method)) { 
     347            if (is_array($method)) { 
     348                if (!method_exists($method[0], $method[1])) { 
     349                return new IXR_Error(-32601, 'server error. requested object method "'.$method[1].'" does not exist.'); 
     350                } 
     351            } else if (!function_exists($method)) { 
    348352                return new IXR_Error(-32601, 'server error. requested function "'.$method.'" does not exist.'); 
    349353            } 
    350354            // Call the function 
    351             $result = $method($args); 
     355            $result = call_user_func($method, $args); 
    352356        } 
    353357        return $result; 
    354358    }