chagenbu Thu Mar 29 11:54:28 2001 EDT
Modified files:
/php4/pear PEAR.php.in
Log:
Fix a couple of warnings when calling PEAR::raiseError() statically.
Index: php4/pear/PEAR.php.in
diff -u php4/pear/PEAR.php.in:1.16 php4/pear/PEAR.php.in:1.17
--- php4/pear/PEAR.php.in:1.16 Thu Mar 22 17:15:05 2001
+++ php4/pear/PEAR.php.in Thu Mar 29 11:54:27 2001
@@ -17,7 +17,7 @@
// | Stig Bakken <[EMAIL PROTECTED]> |
// +----------------------------------------------------------------------+
//
-// $Id: PEAR.php.in,v 1.16 2001/03/23 01:15:05 ssb Exp $
+// $Id: PEAR.php.in,v 1.17 2001/03/29 19:54:27 chagenbu Exp $
//
define('PEAR_ERROR_RETURN', 1);
@@ -234,14 +234,18 @@
$options = null, $userinfo = null)
{
if ($mode === null) {
- $mode = $this->_default_error_mode;
+ if (isset($this->_default_error_mode)) {
+ $mode = $this->_default_error_mode;
+ }
if ($mode === null) {
$mode = $GLOBALS['_PEAR_default_error_mode'];
}
}
if ($mode == PEAR_ERROR_TRIGGER && $options === null) {
- $options = $this->_default_error_options;
+ if (isset($this->_default_error_options)) {
+ $options = $this->_default_error_options;
+ }
if ($options === null) {
$options = $GLOBALS['_PEAR_default_error_options'];
}
@@ -251,14 +255,20 @@
if (!is_string($options) &&
!(is_array($options) && sizeof($options) == 2 &&
is_object($options[0]) && is_string($options[1]))) {
- $options = $this->_default_error_callback;
+ if (isset($this->_default_error_callback)) {
+ $options = $this->_default_error_callback;
+ }
if ($options === null) {
$options = $GLOBALS['_PEAR_default_error_callback'];
}
}
} else {
if ($options === null) {
- $options = $this->_default_error_options;
+ if (isset($this->_default_error_options)) {
+ $options = $this->_default_error_options;
+ } else {
+ $options = $GLOBALS['_PEAR_default_error_options'];
+ }
}
}
return new PEAR_Error($message, $code, $mode, $options, $userinfo);
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]