diff --git a/application/ManiaControl.php b/application/ManiaControl.php index 71406a10..5f1e5688 100644 --- a/application/ManiaControl.php +++ b/application/ManiaControl.php @@ -1,10 +1,11 @@ getMessage()} Trace: {$ex->getTraceAsString()}!"; + logMessage($message); +} // Autoload Function that loads ManiaControl Class Files on Demand -spl_autoload_register( - function ($className) { - $classPath = str_replace('\\', DIRECTORY_SEPARATOR, $className); - $classPath = preg_replace('/ManiaControl/', 'core', $classPath, 1); - $filePath = ManiaControlDir . DIRECTORY_SEPARATOR . $classPath . '.php'; - if (file_exists($filePath)) { - require_once $filePath; - } - }); +spl_autoload_register(function ($className) { + $classPath = str_replace('\\', DIRECTORY_SEPARATOR, $className); + $classPath = preg_replace('/ManiaControl/', 'core', $classPath, 1); + $filePath = ManiaControlDir . DIRECTORY_SEPARATOR . $classPath . '.php'; + if (file_exists($filePath)) { + require_once $filePath; + } +}); // Start ManiaControl $maniaControl = new \ManiaControl\ManiaControl();