// +----------------------------------------------------------------------+
// | Authors: Stig Bakken <ssb@php.net> |
// | Martin Jansen <mj@php.net> |
+// | Greg Beaver <cellog@php.net> |
// +----------------------------------------------------------------------+
//
// $Id$
'message' => $msg,
);
+ if ($repackage) {
+ $err['repackage'] = $repackage;
+ }
+
// set up the error message, if necessary
if ($this->_msgCallback) {
$msg = call_user_func_array($this->_msgCallback,
$err['message'] = $msg;
}
- if ($repackage) {
- $err['repackage'] = $repackage;
- }
$push = $log = true;
$die = false;
// try the overriding callback first
} else {
$mainmsg = $stack->getErrorMessageTemplate($err['code']);
}
+
$mainmsg = str_replace('%__msg%', $err['message'], $mainmsg);
- if (count($err['params'])) {
+
+ if (count($err['params']) && count($err['params'])) {
foreach ($err['params'] as $name => $val) {
if (is_array($val)) {
// @ is needed in case $val is a multi-dimensional array
}
$stack = &PEAR_ErrorStack::singleton('PEAR_ErrorStack');
$stack->pushCallback(array('PEAR_ErrorStack', '_handleError'));
-?>
\ No newline at end of file
+?>
$this->saveCache($_args, $result);
};
return $result;
- } else {
- return $this->raiseError("For this remote PEAR operation you need to load the xmlrpc extension or install XML_RPC");
+ } elseif (!@include_once("XML/RPC.php")) {
+ return $this->raiseError("For this remote PEAR operation you need to install the XML_RPC package");
}
array_shift($args);