From 3d24c1c881ff3ca1141da5f4f87bb9d8e0095d31 Mon Sep 17 00:00:00 2001 From: Celestora Date: Mon, 18 Apr 2022 19:42:05 +0300 Subject: [PATCH] Try to guess CDN the protocol if it is set to NULL in config --- Web/Models/Entities/Media.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Web/Models/Entities/Media.php b/Web/Models/Entities/Media.php index b0f43242..9377f3e8 100644 --- a/Web/Models/Entities/Media.php +++ b/Web/Models/Entities/Media.php @@ -66,7 +66,7 @@ abstract class Media extends Postable case "server": $settings = (object) OPENVK_ROOT_CONF["openvk"]["preferences"]["uploads"]["server"]; return ( - $settings->protocol . + $settings->protocol ?? ovk_scheme() . "://" . $settings->host . $settings->path . substr($hash, 0, 2) . "/$hash.$this->fileExtension"