import v1.1.0_beta1 | 2009-08-21

This commit is contained in:
2019-07-17 22:16:19 +02:00
parent 2c1152f0d3
commit 8dee6b1a10
2306 changed files with 251360 additions and 23428 deletions

View File

@ -23,11 +23,6 @@
*/
require_once 'Zend/XmlRpc/Value.php';
/**
* Zend_XmlRpc_Exception
*/
require_once 'Zend/XmlRpc/Exception.php';
/**
* XMLRPC Faults
*
@ -197,6 +192,7 @@ class Zend_XmlRpc_Fault
public function loadXml($fault)
{
if (!is_string($fault)) {
require_once 'Zend/XmlRpc/Exception.php';
throw new Zend_XmlRpc_Exception('Invalid XML provided to fault');
}
@ -204,6 +200,7 @@ class Zend_XmlRpc_Fault
$xml = @new SimpleXMLElement($fault);
} catch (Exception $e) {
// Not valid XML
require_once 'Zend/XmlRpc/Exception.php';
throw new Zend_XmlRpc_Exception('Failed to parse XML fault: ' . $e->getMessage(), 500);
}
@ -215,6 +212,7 @@ class Zend_XmlRpc_Fault
if (!$xml->fault->value->struct) {
// not a proper fault
require_once 'Zend/XmlRpc/Exception.php';
throw new Zend_XmlRpc_Exception('Invalid fault structure', 500);
}
@ -231,6 +229,7 @@ class Zend_XmlRpc_Fault
}
if (empty($code) && empty($message)) {
require_once 'Zend/XmlRpc/Exception.php';
throw new Zend_XmlRpc_Exception('Fault code and string required');
}
@ -261,6 +260,7 @@ class Zend_XmlRpc_Fault
public static function isFault($xml)
{
$fault = new self();
require_once 'Zend/XmlRpc/Exception.php';
try {
$isFault = $fault->loadXml($xml);
} catch (Zend_XmlRpc_Exception $e) {