From: Tomas V.V.Cox Date: Fri, 31 Aug 2001 16:12:33 +0000 (+0000) Subject: Use _default_error_options as the options for PEAR_ERROR_CALLBACK. X-Git-Tag: PRE_SUBST_Z_MACROS~286 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4861c0cf99f77289fb60f45aabcf8d43e911ec5f;p=php Use _default_error_options as the options for PEAR_ERROR_CALLBACK. Depreciate the use of _default_error_callback --- diff --git a/pear/PEAR.php b/pear/PEAR.php index d0e3ddffc1..8ca8b81a72 100644 --- a/pear/PEAR.php +++ b/pear/PEAR.php @@ -234,11 +234,11 @@ class PEAR if (isset($this)) { $setmode = &$this->_default_error_mode; $setoptions = &$this->_default_error_options; - $setcallback = &$this->_default_error_callback; + //$setcallback = &$this->_default_error_callback; } else { $setmode = &$GLOBALS['_PEAR_default_error_mode']; $setoptions = &$GLOBALS['_PEAR_default_error_options']; - $setcallback = &$GLOBALS['_PEAR_default_error_callback']; + //$setcallback = &$GLOBALS['_PEAR_default_error_callback']; } switch ($mode) { @@ -256,7 +256,7 @@ class PEAR if ((is_string($options) && function_exists($options)) || (is_array($options) && method_exists(@$options[0], @$options[1]))) { - $setcallback = $options; + $setoptions = $options; } else { trigger_error("invalid error callback", E_USER_WARNING); } @@ -389,10 +389,10 @@ class PEAR !(is_array($options) && sizeof($options) == 2 && is_object($options[0]) && is_string($options[1]))) { - if (isset($this) && isset($this->_default_error_callback)) { - $options = $this->_default_error_callback; + if (isset($this) && isset($this->_default_error_options)) { + $options = $this->_default_error_options; } else { - $options = $GLOBALS['_PEAR_default_error_callback']; + $options = $GLOBALS['_PEAR_default_error_options']; } } } else {