From: Greg Beaver Date: Fri, 27 Feb 2004 02:27:12 +0000 (+0000) Subject: MFH X-Git-Tag: php-4.3.5RC4~58 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2184a5a584faf1ab6a8ff744733e4a8a0b60e3c4;p=php MFH --- diff --git a/pear/PEAR.php b/pear/PEAR.php index 017b88b544..17b4df51f5 100644 --- a/pear/PEAR.php +++ b/pear/PEAR.php @@ -40,6 +40,15 @@ if (substr(PHP_OS, 0, 3) == 'WIN') { define('PEAR_OS', 'Unix'); // blatant assumption } +// instant backwards compatibility +if (!defined('PATH_SEPARATOR')) { + if (OS_WINDOWS) { + define('PATH_SEPARATOR', ';'); + } else { + define('PATH_SEPARATOR', ':'); + } +} + $GLOBALS['_PEAR_default_error_mode'] = PEAR_ERROR_RETURN; $GLOBALS['_PEAR_default_error_options'] = E_USER_NOTICE; $GLOBALS['_PEAR_destructor_object_list'] = array(); @@ -184,7 +193,7 @@ class PEAR /** * If you have a class that's mostly/entirely static, and you need static * properties, you can use this method to simulate them. Eg. in your method(s) - * do this: $myVar = &PEAR::getStaticProperty('myVar'); + * do this: $myVar = &PEAR::getStaticProperty('myclass', 'myVar'); * You MUST use a reference, or they will not persist! * * @access public diff --git a/pear/PEAR/Autoloader.php b/pear/PEAR/Autoloader.php index bde2a66053..e5f924ceb5 100644 --- a/pear/PEAR/Autoloader.php +++ b/pear/PEAR/Autoloader.php @@ -162,7 +162,7 @@ class PEAR_Autoloader extends PEAR $classname = strtolower($classname); reset($this->_method_map); while (list($method, $obj) = each($this->_method_map)) { - if (get_class($obj) == $classname) { + if (is_a($obj, $classname)) { unset($this->_method_map[$method]); $ok = true; } diff --git a/pear/PEAR/Command.php b/pear/PEAR/Command.php index 2ed5f3ce43..c9738cc5ff 100644 --- a/pear/PEAR/Command.php +++ b/pear/PEAR/Command.php @@ -160,7 +160,7 @@ class PEAR_Command function &setFrontendClass($uiclass) { if (is_object($GLOBALS['_PEAR_Command_uiobject']) && - strtolower($uiclass) == get_class($GLOBALS['_PEAR_Command_uiobject'])) { + is_a($GLOBALS['_PEAR_Command_uiobject'], $uiclass)) { return $GLOBALS['_PEAR_Command_uiobject']; } if (!class_exists($uiclass)) {