From 81eedac0b743bb675ac203bb57bfcbf9e62279f7 Mon Sep 17 00:00:00 2001 From: AntonLV Date: Fri, 13 Sep 2024 13:20:53 +0300 Subject: [PATCH] Ticket #4803 - Comments: PHP error on view comment page without necessary parameters. --- template/scripts/BxBaseCmtsPageView.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/template/scripts/BxBaseCmtsPageView.php b/template/scripts/BxBaseCmtsPageView.php index 4cf2a95992..5219cad169 100644 --- a/template/scripts/BxBaseCmtsPageView.php +++ b/template/scripts/BxBaseCmtsPageView.php @@ -54,7 +54,8 @@ protected function _isAvailablePage ($a) public function getCode() { - BxDolTemplate::getInstance()->setPageUrl($this->_oCmts->getViewUrl($this->_iCmtId)); + if($this->_oCmts) + BxDolTemplate::getInstance()->setPageUrl($this->_oCmts->getViewUrl($this->_iCmtId)); return parent::getCode(); }