cvs: php-src /pear PEAR.php

From: Date: Wed, 14 Jan 2004 22:43:13 +0000
Subject: cvs: php-src /pear PEAR.php
Groups: php.pear.cvs php.pear.core 
Request: Send a blank email to pear-core+get-57@lists.php.net to get a copy of this message
cellog Wed Jan 14 17:43:13 2004 EDT Modified files: /php-src/pear PEAR.php Log: fix get_class() case-sensitive incompatibility in PHP5 Index: php-src/pear/PEAR.php diff -u php-src/pear/PEAR.php:1.73 php-src/pear/PEAR.php:1.74 --- php-src/pear/PEAR.php:1.73 Thu Jan 8 12:33:08 2004 +++ php-src/pear/PEAR.php Wed Jan 14 17:43:12 2004 @@ -18,7 +18,7 @@ // | Tomas V.V.Cox <cox@idecnet.com> | // +----------------------------------------------------------------------+ // -// $Id: PEAR.php,v 1.73 2004/01/08 17:33:08 sniper Exp $ +// $Id: PEAR.php,v 1.74 2004/01/14 22:43:12 cellog Exp $ // define('PEAR_ERROR_RETURN', 1); @@ -232,8 +232,8 @@ */ 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 @@ 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 @@ { $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 @@ $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 @@ 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);

« previous php.pear.core (#57) next »