Skip to content

Commit

Permalink
Improved autoloader to not raise an error on non-existent files
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasbachem committed Oct 4, 2013
1 parent e7c58b9 commit fd7007e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/autoload.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@

$classPath = strtr(substr($className, strlen('UnitedPrototype')), '\\', '/') . '.php';

require(__DIR__ . $classPath);
if(file_exists(__DIR__ . $classPath)) {
require(__DIR__ . $classPath);
}
});

?>

0 comments on commit fd7007e

Please sign in to comment.