]> BookStack Code Mirror - bookstack/blobdiff - app/Util/SsrUrlValidator.php
PHP: Addressed 8.4 deprecations within app itself
[bookstack] / app / Util / SsrUrlValidator.php
index 0b3a6a31de9a3a79823c2c3c7a129dc251ab531b..076a653fc86752e9f94b8cd7f93c72748c0f34ac 100644 (file)
@@ -4,11 +4,16 @@ namespace BookStack\Util;
 
 use BookStack\Exceptions\HttpFetchException;
 
+/**
+ * Validate the host we're connecting to when making a server-side-request.
+ * Will use the given hosts config if given during construction otherwise
+ * will look to the app configured config.
+ */
 class SsrUrlValidator
 {
     protected string $config;
 
-    public function __construct(string $config = null)
+    public function __construct(?string $config = null)
     {
         $this->config = $config ?? config('app.ssr_hosts') ?? '';
     }