소스 검색

Updated file_exists() to is_file() and changed require_once() to require() per Predis' author's suggestions

Irakli Nadareishvili 13 년 전
부모
커밋
4f16e232a8
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      lib/Predis/Autoloader.php

+ 2 - 2
lib/Predis/Autoloader.php

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