Browse Source

Merge remote-tracking branch 'inadarei/v0.7' into v0.7

Daniele Alessandri 12 years ago
parent
commit
105bf8a2ee
1 changed files with 4 additions and 1 deletions
  1. 4 1
      lib/Predis/Autoloader.php

+ 4 - 1
lib/Predis/Autoloader.php

@@ -52,7 +52,10 @@ class Autoloader
     {
         if (0 === strpos($className, $this->prefix)) {
             $parts = explode('\\', substr($className, $this->prefixLength));
-            require($this->directory.DIRECTORY_SEPARATOR.implode(DIRECTORY_SEPARATOR, $parts).'.php');
+            $filepath = $this->directory.DIRECTORY_SEPARATOR.implode(DIRECTORY_SEPARATOR, $parts).'.php';
+            if (is_file($filepath)) {
+                require($filepath);
+            }
         }
     }
 }