From fd7007e75d40e7bf6bd1af0c7b377baab0e1bff7 Mon Sep 17 00:00:00 2001 From: Thomas Bachem Date: Fri, 4 Oct 2013 18:29:08 +0000 Subject: [PATCH] Improved autoloader to not raise an error on non-existent files --- src/autoload.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/autoload.php b/src/autoload.php index a55393d..3c57790 100644 --- a/src/autoload.php +++ b/src/autoload.php @@ -10,7 +10,9 @@ $classPath = strtr(substr($className, strlen('UnitedPrototype')), '\\', '/') . '.php'; - require(__DIR__ . $classPath); + if(file_exists(__DIR__ . $classPath)) { + require(__DIR__ . $classPath); + } }); ?>