Groups: Fix error when changing website

This commit is contained in:
Maxim Leshchenko 2021-11-13 23:43:51 +02:00 committed by GitHub
parent 2c31900d97
commit 3d07339431
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -208,9 +208,9 @@ final class GroupPresenter extends OpenVKPresenter
$website = $this->postParam("website") ?? "";
if(empty($website))
$user->setWebsite(NULL);
$club->setWebsite(NULL);
else
$user->setWebsite((!parse_url($website, PHP_URL_SCHEME) ? "https://" : "") . $website);
$club->setWebsite((!parse_url($website, PHP_URL_SCHEME) ? "https://" : "") . $website);
if($_FILES["ava"]["error"] === UPLOAD_ERR_OK) {
$photo = new Photo;