]> git.mxchange.org Git - friendica.git/commitdiff
Add more transparent errors and make it possible to see them in logs
authorPhilipp <admin@philipp.info>
Sat, 21 Jan 2023 20:06:06 +0000 (21:06 +0100)
committerPhilipp <admin@philipp.info>
Sat, 21 Jan 2023 20:07:20 +0000 (21:07 +0100)
src/App/BaseURL.php
src/App/Request.php

index d394dfce9553eae767f41de3700d19eaac67cc5a..f02cb9ef9936a7b5a92495cbbbd7feadafd7c1eb 100644 (file)
@@ -264,6 +264,10 @@ class BaseURL
                $this->sslPolicy = $this->config->get('system', 'ssl_policy') ?? static::DEFAULT_SSL_SCHEME;
                $this->url       = $this->config->get('system', 'url');
 
+               if (empty($this->hostname) || empty($this->url)) {
+                       throw new \Exception('Invalid config - Missing system.url or config.hostname');
+               }
+
                $this->determineSchema();
        }
 
index 675841ae764d065248891a463adad6331b9b1708..d61303d5d729f410c8776aec4d534f04e53629b1 100644 (file)
@@ -74,7 +74,7 @@ class Request
        public function __construct(IManageConfigValues $config, array $server = [])
        {
                $this->remoteAddress = $this->determineRemoteAddress($config, $server);
-               $this->requestId = $server[static::DEFAULT_REQUEST_ID_HEADER] ?? System::createGUID(8);
+               $this->requestId = $server[static::DEFAULT_REQUEST_ID_HEADER] ?? System::createGUID(8, false);
        }
 
        /**