cvs: pear-core(PEAR_1_3) /PEAR ErrorStack.php

From: Date: Sat, 13 Aug 2005 14:15:21 +0000
Subject: cvs: pear-core(PEAR_1_3) /PEAR ErrorStack.php
Groups: php.pear.cvs php.pear.core 
Request: Send a blank email to pear-core+get-3510@lists.php.net to get a copy of this message
pajoye Sat Aug 13 10:15:21 2005 EDT Modified files: (Branch: PEAR_1_3) /pear-core/PEAR ErrorStack.php Log: - MFH, ErrorStack 1.4 to 1.3 sync http://cvs.php.net/diff.php/pear-core/PEAR/ErrorStack.php?r1=1.7.2.5&r2=1.7.2.6&ty=u Index: pear-core/PEAR/ErrorStack.php diff -u pear-core/PEAR/ErrorStack.php:1.7.2.5 pear-core/PEAR/ErrorStack.php:1.7.2.6 --- pear-core/PEAR/ErrorStack.php:1.7.2.5 Sat Jan 1 16:26:51 2005 +++ pear-core/PEAR/ErrorStack.php Sat Aug 13 10:15:19 2005 @@ -17,7 +17,7 @@ // | | // +----------------------------------------------------------------------+ // -// $Id: ErrorStack.php,v 1.7.2.5 2005/01/01 21:26:51 cellog Exp $ +// $Id: ErrorStack.php,v 1.7.2.6 2005/08/13 14:15:19 pajoye Exp $ /** * Error Stack Implementation @@ -538,6 +538,10 @@ '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 @@ $err['message'] = $msg; } - if ($repackage) { - $err['repackage'] = $repackage; - } $push = $log = true; $die = false; // try the overriding callback first @@ -909,8 +910,10 @@ } 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 @@ } $stack = &PEAR_ErrorStack::singleton('PEAR_ErrorStack'); $stack->pushCallback(array('PEAR_ErrorStack', '_handleError')); -?> \ No newline at end of file +?>

« previous php.pear.core (#3510) next »