diff options
author | Greg Beaver <cellog@php.net> | 2004-01-14 22:43:12 +0000 |
---|---|---|
committer | Greg Beaver <cellog@php.net> | 2004-01-14 22:43:12 +0000 |
commit | 7dc2bf36050091ead6ce9259449f456db0306906 (patch) | |
tree | 3d1382abb4a61cdb96d9266c31c17bd41c5ad9da | |
parent | 6915f5a2f51210b40d71987742611ea115f8042b (diff) | |
download | php-git-7dc2bf36050091ead6ce9259449f456db0306906.tar.gz |
fix get_class() case-sensitive incompatibility in PHP5
-rw-r--r-- | pear/PEAR.php | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/pear/PEAR.php b/pear/PEAR.php index 4d78cc14a0..b438cc7248 100644 --- a/pear/PEAR.php +++ b/pear/PEAR.php @@ -232,8 +232,8 @@ class PEAR */ function isError($data, $code = null) { - if (is_object($data) && (get_class($data) == 'pear_error' || - is_subclass_of($data, 'pear_error'))) { + if (is_object($data) && (strtolower(get_class($data)) == 'pear_error' || + is_subclass_of($data, 'PEAR_Error'))) { if (is_null($code)) { return true; } elseif (is_string($code)) { @@ -290,7 +290,7 @@ class PEAR function setErrorHandling($mode = null, $options = null) { if (isset($this) && - (get_class($this) == 'pear' || is_subclass_of($this, 'pear'))) { + (strtolower(get_class($this)) == 'pear' || is_subclass_of($this, 'PEAR'))) { $setmode = &$this->_default_error_mode; $setoptions = &$this->_default_error_options; } else { @@ -568,7 +568,7 @@ class PEAR { $stack = &$GLOBALS['_PEAR_error_handler_stack']; if (isset($this) && - (get_class($this) == 'pear' || is_subclass_of($this, 'pear'))) { + (strtolower(get_class($this)) == 'pear' || is_subclass_of($this, 'PEAR'))) { $def_mode = &$this->_default_error_mode; $def_options = &$this->_default_error_options; } else { @@ -578,7 +578,7 @@ class PEAR $stack[] = array($def_mode, $def_options); if (isset($this) && - (get_class($this) == 'pear' || is_subclass_of($this, 'pear'))) { + (strtolower(get_class($this)) == 'pear' || is_subclass_of($this, 'PEAR'))) { $this->setErrorHandling($mode, $options); } else { PEAR::setErrorHandling($mode, $options); @@ -604,7 +604,7 @@ class PEAR list($mode, $options) = $stack[sizeof($stack) - 1]; array_pop($stack); if (isset($this) && - (get_class($this) == 'pear' || is_subclass_of($this, 'pear'))) { + (strtolower(get_class($this)) == 'pear' || is_subclass_of($this, 'PEAR'))) { $this->setErrorHandling($mode, $options); } else { PEAR::setErrorHandling($mode, $options); |