Sfoglia il codice sorgente

Ticket #4803 - Comments: PHP error on view comment page without necessary parameters.

AntonLV 2 anni fa
parent
commit
81eedac0b7
1 ha cambiato i file con 2 aggiunte e 1 eliminazioni
  1. 2 1
      template/scripts/BxBaseCmtsPageView.php

+ 2 - 1
template/scripts/BxBaseCmtsPageView.php

@@ -54,7 +54,8 @@ class BxBaseCmtsPageView extends BxTemplPage
 
     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();
     }