If APP_ROOT is not set when detecting vendor, its probably the parent

This commit is contained in:
Greyscale 2024-06-10 06:06:27 +02:00
parent 780a721492
commit 731558329e
No known key found for this signature in database
GPG key ID: 74BAFF55434DA4B2

View file

@ -14,6 +14,10 @@ function detectAndLoadVendor($path = __DIR__): void
define('VENDOR_PATH', $fileInfo->getRealPath());
require_once VENDOR_PATH . '/autoload.php';
if(!defined('APP_ROOT')) {
define('APP_ROOT', VENDOR_PATH . "/../");
}
return;
}