mirror of
https://github.com/php/php-src.git
synced 2025-08-19 08:49:28 +02:00
Cleaner (and probably safer) condition handling.
This commit is contained in:
parent
b2f09a03a2
commit
c20a6ff9dc
1 changed files with 3 additions and 6 deletions
|
@ -236,8 +236,7 @@ class PEAR
|
||||||
if ($mode === null) {
|
if ($mode === null) {
|
||||||
if (isset($this->_default_error_mode)) {
|
if (isset($this->_default_error_mode)) {
|
||||||
$mode = $this->_default_error_mode;
|
$mode = $this->_default_error_mode;
|
||||||
}
|
} else {
|
||||||
if ($mode === null) {
|
|
||||||
$mode = $GLOBALS['_PEAR_default_error_mode'];
|
$mode = $GLOBALS['_PEAR_default_error_mode'];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -245,8 +244,7 @@ class PEAR
|
||||||
if ($mode == PEAR_ERROR_TRIGGER && $options === null) {
|
if ($mode == PEAR_ERROR_TRIGGER && $options === null) {
|
||||||
if (isset($this->_default_error_options)) {
|
if (isset($this->_default_error_options)) {
|
||||||
$options = $this->_default_error_options;
|
$options = $this->_default_error_options;
|
||||||
}
|
} else {
|
||||||
if ($options === null) {
|
|
||||||
$options = $GLOBALS['_PEAR_default_error_options'];
|
$options = $GLOBALS['_PEAR_default_error_options'];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -257,8 +255,7 @@ class PEAR
|
||||||
is_object($options[0]) && is_string($options[1]))) {
|
is_object($options[0]) && is_string($options[1]))) {
|
||||||
if (isset($this->_default_error_callback)) {
|
if (isset($this->_default_error_callback)) {
|
||||||
$options = $this->_default_error_callback;
|
$options = $this->_default_error_callback;
|
||||||
}
|
} else {
|
||||||
if ($options === null) {
|
|
||||||
$options = $GLOBALS['_PEAR_default_error_callback'];
|
$options = $GLOBALS['_PEAR_default_error_callback'];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue