Update autoloader.php

This commit is contained in:
Frédéric FRANCE 2019-03-16 19:14:31 +01:00 committed by GitHub
parent c2badb57d7
commit db0108b0e9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -5,8 +5,7 @@
*/
spl_autoload_register(function ($class) {
if (preg_match('/^DebugBar/', $class) || preg_match('/^'.preg_quote('Psr\Log','/').'/', $class))
{
if (preg_match('/^DebugBar/', $class) || preg_match('/^'.preg_quote('Psr\Log', '/').'/', $class)) {
$file = DOL_DOCUMENT_ROOT.'/includes/'.str_replace('\\', DIRECTORY_SEPARATOR, $class).'.php';
//var_dump($class.' - '.file_exists($file).' - '.$file);
if (file_exists($file)) {