Fix bootstrap config loading and root rewrites
This commit is contained in:
@@ -2,6 +2,14 @@
|
||||
|
||||
use App\Core\Config;
|
||||
|
||||
// Ensure the configuration class is loaded even if SPL autoloading is not yet available
|
||||
if (!class_exists(Config::class, false)) {
|
||||
$configPath = __DIR__ . '/../app/Core/Config.php';
|
||||
if (file_exists($configPath)) {
|
||||
require_once $configPath;
|
||||
}
|
||||
}
|
||||
|
||||
if (!function_exists('config')) {
|
||||
function config(string $key, $default = null)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user