From c20a6ff9dc2f9b877cca1d8bf9b50997e80298b8 Mon Sep 17 00:00:00 2001 From: Jon Parise Date: Tue, 3 Apr 2001 03:12:49 +0000 Subject: [PATCH] Cleaner (and probably safer) condition handling. --- pear/PEAR.php.in | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/pear/PEAR.php.in b/pear/PEAR.php.in index 3c6daddf54e..4eeda332096 100644 --- a/pear/PEAR.php.in +++ b/pear/PEAR.php.in @@ -236,8 +236,7 @@ class PEAR if ($mode === null) { if (isset($this->_default_error_mode)) { $mode = $this->_default_error_mode; - } - if ($mode === null) { + } else { $mode = $GLOBALS['_PEAR_default_error_mode']; } } @@ -245,8 +244,7 @@ class PEAR if ($mode == PEAR_ERROR_TRIGGER && $options === null) { if (isset($this->_default_error_options)) { $options = $this->_default_error_options; - } - if ($options === null) { + } else { $options = $GLOBALS['_PEAR_default_error_options']; } } @@ -257,8 +255,7 @@ class PEAR is_object($options[0]) && is_string($options[1]))) { if (isset($this->_default_error_callback)) { $options = $this->_default_error_callback; - } - if ($options === null) { + } else { $options = $GLOBALS['_PEAR_default_error_callback']; } }