summaryrefslogtreecommitdiff
path: root/pear/PEAR/ErrorStack.php
diff options
context:
space:
mode:
Diffstat (limited to 'pear/PEAR/ErrorStack.php')
-rw-r--r--pear/PEAR/ErrorStack.php13
1 files changed, 8 insertions, 5 deletions
diff --git a/pear/PEAR/ErrorStack.php b/pear/PEAR/ErrorStack.php
index d1dcf9233e..9ad94d738c 100644
--- a/pear/PEAR/ErrorStack.php
+++ b/pear/PEAR/ErrorStack.php
@@ -538,6 +538,10 @@ class PEAR_ErrorStack {
'message' => $msg,
);
+ if ($repackage) {
+ $err['repackage'] = $repackage;
+ }
+
// set up the error message, if necessary
if ($this->_msgCallback) {
$msg = call_user_func_array($this->_msgCallback,
@@ -545,9 +549,6 @@ class PEAR_ErrorStack {
$err['message'] = $msg;
}
- if ($repackage) {
- $err['repackage'] = $repackage;
- }
$push = $log = true;
$die = false;
// try the overriding callback first
@@ -909,8 +910,10 @@ class PEAR_ErrorStack {
} 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
@@ -978,4 +981,4 @@ class PEAR_ErrorStack {
}
$stack = &PEAR_ErrorStack::singleton('PEAR_ErrorStack');
$stack->pushCallback(array('PEAR_ErrorStack', '_handleError'));
-?> \ No newline at end of file
+?>