summaryrefslogtreecommitdiff
path: root/pear
diff options
context:
space:
mode:
authorGreg Beaver <cellog@php.net>2003-12-07 00:02:34 +0000
committerGreg Beaver <cellog@php.net>2003-12-07 00:02:34 +0000
commitbd766fc7e5f40af28ef9476b5faa3853c647a039 (patch)
tree25d69cfd26cb8a3d4216bd6e3d45d6ce8dc9273e /pear
parent8161b2f7423a142789318d76c14ad522d20fa034 (diff)
downloadphp-git-bd766fc7e5f40af28ef9476b5faa3853c647a039.tar.gz
fix #167
Diffstat (limited to 'pear')
-rw-r--r--pear/PEAR/Autoloader.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/pear/PEAR/Autoloader.php b/pear/PEAR/Autoloader.php
index 5bd78a9990..fa0b1c020f 100644
--- a/pear/PEAR/Autoloader.php
+++ b/pear/PEAR/Autoloader.php
@@ -84,9 +84,10 @@ class PEAR_Autoloader extends PEAR
function addAutoload($method, $classname = null)
{
if (is_array($method)) {
+ array_walk($method, create_function('$a,&$b', '$b = strtolower($b);'));
$this->_autoload_map = array_merge($this->_autoload_map, $method);
} else {
- $this->_autoload_map[$method] = $classname;
+ $this->_autoload_map[strtolower($method)] = $classname;
}
}
@@ -104,6 +105,7 @@ class PEAR_Autoloader extends PEAR
*/
function removeAutoload($method)
{
+ $method = strtolower($method);
$ok = isset($this->_autoload_map[$method]);
unset($this->_autoload_map[$method]);
return $ok;
@@ -187,6 +189,7 @@ class PEAR_Autoloader extends PEAR
*/
function __call($method, $args, &$retval)
{
+ $method = strtolower($method);
if (empty($this->_method_map[$method]) && isset($this->_autoload_map[$method])) {
$this->addAggregateObject($this->_autoload_map[$method]);
}