From 4e21e9a82f8e9d015afdd406230d5af4d5a56e15 Mon Sep 17 00:00:00 2001 From: ZongLiang <649236041@qq.com> Date: Fri, 18 Jan 2019 16:59:43 +0800 Subject: [PATCH] Update Autoloader.php In the default configuration, do not use Composer to make a judgment process to prevent error reporting. --- system/Autoloader/Autoloader.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/system/Autoloader/Autoloader.php b/system/Autoloader/Autoloader.php index b554ba8e3f84..9f74fc9890ee 100644 --- a/system/Autoloader/Autoloader.php +++ b/system/Autoloader/Autoloader.php @@ -406,6 +406,11 @@ public function sanitizeFilename(string $filename): string */ protected function discoverComposerNamespaces() { + if (! is_file(COMPOSER_PATH)) + { + return false; + } + $composer = include COMPOSER_PATH; $paths = $composer->getPrefixesPsr4();