Commit 20b2cc11 authored by Marc Egger's avatar Marc Egger
Browse files

Refs #12159 throw exception at the latest possible point to fix unit tests

parent ae43b8fb
Pipeline #5210 failed with stages
in 3 minutes and 32 seconds
...@@ -225,14 +225,17 @@ class Path ...@@ -225,14 +225,17 @@ class Path
} }
/** /**
* If the base url is not set then use relative path.
*
* @param mixed ...$pathPartsToAppend * @param mixed ...$pathPartsToAppend
* @return string * @return string
* @throws \UserFormException
*/ */
public static function urlApp(...$pathPartsToAppend): string public static function urlApp(...$pathPartsToAppend): string
{ {
return self::join(self::$urlApp ?? '', $pathPartsToAppend); // ensure base url is configured
if (is_null(self::$urlApp) || self::$urlApp === '') {
Thrower::userFormException('Base url not configured.', 'Go to QFQ extension configuration in the Typo3 backend and fill in a value for config.baseUrl');
}
return self::join(self::$urlApp, $pathPartsToAppend);
} }
/** /**
......
...@@ -113,12 +113,7 @@ class Config { ...@@ -113,12 +113,7 @@ class Config {
self::$config = $config; self::$config = $config;
// ensure base url is configured and use it for urls Path::setUrlApp(self::get(SYSTEM_BASE_URL));
$baseUrl = self::get(SYSTEM_BASE_URL);
if (is_null($baseUrl) || $baseUrl === '') {
Thrower::userFormException('Base url not configured.', 'Go to QFQ extension configuration in the Typo3 backend and fill in a value for config.baseUrl');
}
Path::setUrlApp($baseUrl);
// Set log paths // Set log paths
Path::overrideLogPathsFromConfig(); Path::overrideLogPathsFromConfig();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment