]> granicus.if.org Git - php/commitdiff
fix #167
authorGreg Beaver <cellog@php.net>
Sun, 7 Dec 2003 00:02:34 +0000 (00:02 +0000)
committerGreg Beaver <cellog@php.net>
Sun, 7 Dec 2003 00:02:34 +0000 (00:02 +0000)
pear/PEAR/Autoloader.php

index 5bd78a9990a93eecc60e53e33b973e67adda1114..fa0b1c020f2d9de80d34e81ea5f61a56636aeb58 100644 (file)
@@ -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]);
         }