RSS: Get rid of 500 error

a.k.a. Update WallPresenter.php (#688)
This commit is contained in:
n1rwana 2022-08-28 14:01:31 +03:00 committed by GitHub
parent 4891030ed0
commit 9842327d3b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -113,14 +113,14 @@ final class WallPresenter extends OpenVKPresenter
$feed = new Feed();
$channel = new Channel();
$channel->title($post->getOwner()->getCanonicalName() . "" . OPENVK_ROOT_CONF['openvk']['appearance']['name'])->url(ovk_scheme(true) . $_SERVER["SERVER_NAME"])->appendTo($feed);
$channel->title($owner->getCanonicalName() . "" . OPENVK_ROOT_CONF['openvk']['appearance']['name'])->url(ovk_scheme(true) . $_SERVER["HTTP_HOST"])->appendTo($feed);
foreach($posts as $post) {
$item = new Item();
$item
->title($post->getOwner()->getCanonicalName())
->description($post->getText())
->url(ovk_scheme(true).$_SERVER["SERVER_NAME"]."/wall{$post->getPrettyId()}")
->url(ovk_scheme(true).$_SERVER["HTTP_HOST"]."/wall{$post->getPrettyId()}")
->pubDate($post->getPublicationTime()->timestamp())
->appendTo($channel);
}