diff --git a/src/Libs/Router.php b/src/Libs/Router.php index 10f0231..38c3187 100644 --- a/src/Libs/Router.php +++ b/src/Libs/Router.php @@ -82,7 +82,7 @@ class Router { */ public static function basePath(): string { - if (defined('SITE_URL')) + if (defined('SITE_URL') && !empty(SITE_URL)) return parse_url(SITE_URL, PHP_URL_PATH); return str_replace($_SERVER['DOCUMENT_ROOT'], '/', ROOT_DIR); }