Răsfoiți Sursa

#2634 API: minor fix

Alex Trofimov 6 ani în urmă
părinte
comite
cc71170f7e
1 a modificat fișierele cu 2 adăugiri și 3 ștergeri
  1. 2 3
      template/scripts/BxBasePage.php

+ 2 - 3
template/scripts/BxBasePage.php

@@ -329,9 +329,8 @@ class BxBasePage extends BxDolPage
 
         if (isset($GLOBALS['bx_profiler'])) $GLOBALS['bx_profiler']->beginPageBlock(_t($aBlock['title']), $aBlock['id']);
 
-        if ($this->_isVisibleBlock($aBlock)) {
-
-            $sFunc = '_getBlock' . ucfirst($aBlock['type']);
+        $sFunc = '_getBlock' . ucfirst($aBlock['type']);
+        if ($this->_isVisibleBlock($aBlock) && method_exists($this, $sFunc)) {
             $mixedContent = $this->$sFunc($aBlock);
 
             $sTitle = $this->getBlockTitle($aBlock);