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"