Skip to content

Commit

Permalink
Updated file_exists() to is_file() and changed require_once() to requ…
Browse files Browse the repository at this point in the history
…ire() per Predis' author's suggestions
  • Loading branch information
inadarei committed May 26, 2012
1 parent 703c3ce commit 4f16e23
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/Predis/Autoloader.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ public function autoload($className)
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);
}
}
}
Expand Down

0 comments on commit 4f16e23

Please sign in to comment.