mirror of
https://github.com/nextcloud/server.git
synced 2026-04-22 14:50:17 -04:00
Prevent empty base URL during installation
Signed-off-by: Louis Chemineau <louis@chmn.me>
This commit is contained in:
parent
5a469f54ab
commit
18d32a1ce7
1 changed files with 2 additions and 1 deletions
|
|
@ -271,7 +271,8 @@ class URLGenerator implements IURLGenerator {
|
|||
* @return string base url of the current request
|
||||
*/
|
||||
public function getBaseUrl(): string {
|
||||
if ($this->baseUrl === null) {
|
||||
// BaseUrl can be equal to 'http(s)://' during the first steps of the intial setup.
|
||||
if ($this->baseUrl === null || $this->baseUrl === "http://" || $this->baseUrl === "https://") {
|
||||
$this->baseUrl = $this->request->getServerProtocol() . '://' . $this->request->getServerHost() . \OC::$WEBROOT;
|
||||
}
|
||||
return $this->baseUrl;
|
||||
|
|
|
|||
Loading…
Reference in a new issue