Make WordPress Core

Changeset 2103


Ignore:
Timestamp:
01/18/2005 06:12:23 AM (19 years ago)
Author:
saxmatt
Message:

http://mosquito.wordpress.org/view.php?id=708 - Patch from Owen Winkler allowing XML-RPC library to call classes without extending the base class.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/class-IXR.php

    r1673 r2103  
    33/*
    44   IXR - The Inutio XML-RPC Library - (c) Incutio Ltd 2002
    5    Version 1.61 - Simon Willison, 11th July 2003 (htmlentities -> htmlspecialchars)
     5   Version 1.62WP - Simon Willison, 11th July 2003 (htmlentities -> htmlspecialchars)
     6           ^^^^^^ (We've made some changes)
    67   Site:   http://scripts.incutio.com/xmlrpc/
    78   Manual: http://scripts.incutio.com/xmlrpc/manual.php
     
    345346        } else {
    346347            // It's a function - does it exist?
    347             if (!function_exists($method)) {
     348            if (is_array($method)) {
     349                if (!method_exists($method[0], $method[1])) {
     350                return new IXR_Error(-32601, 'server error. requested object method "'.$method[1].'" does not exist.');
     351                }
     352            } else if (!function_exists($method)) {
    348353                return new IXR_Error(-32601, 'server error. requested function "'.$method.'" does not exist.');
    349354            }
    350355            // Call the function
    351             $result = $method($args);
     356            $result = call_user_func($method, $args);
    352357        }
    353358        return $result;
Note: See TracChangeset for help on using the changeset viewer.