Skip to content

Commit fd7007e

Browse files
committed
Improved autoloader to not raise an error on non-existent files
1 parent e7c58b9 commit fd7007e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/autoload.php

+3-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@
1010

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

13-
require(__DIR__ . $classPath);
13+
if(file_exists(__DIR__ . $classPath)) {
14+
require(__DIR__ . $classPath);
15+
}
1416
});
1517

1618
?>

0 commit comments

Comments
 (0)