Error

Call to a member function createUrl() on null

/var/www/lifedeco/data/www/lifedeco.kz/protected/views/templates/catalog/_catalogmenu.php(89)

077         <?php foreach ($catalogCategory->children as $menuItem):
078             if (in_array($menuItem->id, $existingCategories)) {
079                 continue;
080             }
081             $active = '';
082             if ($menuItem->catalogsale == $categoryID) {
083                 $active = ' active';
084             }
085             ?>
086             <li class="item<?php echo $active; ?>" data-id="<?php echo $menuItem->id; ?>"
087                 data-alias="<?php echo $menuItem->alias; ?>" data-type="<?php echo $menuItem->type; ?>">
088                 <span><a
089                             href="<?php echo Yii::app()->struct->currentCategory->createUrl() . '/index/' . $menuItem->id ?>"><?php echo $menuItem->title; ?></a>
090                 </span>
091                 <?php if ($menuItem->children): ?>
092                     <ul style="display: block;">
093                         <?php foreach ($menuItem->children as $subMenuItem):
094                             $categoryIDs = explode(',', $subMenuItem->catalogsale);
095                             $var = array_intersect($categoryIDs, $existingCategories);
096                             if ( ! $var) {
097                                 continue;
098                             }
099                             $active = '';
100                             if ($subMenuItem->catalogsale == $categoryID) {
101                                 $active = ' active';

Stack Trace

#3
+
 /var/www/lifedeco/data/www/lifedeco.kz/protected/views/templates/catalog/template.php(186): CController->renderPartial("application.views.templates.catalog._catalogmenu", array("existingCategories" => array("702", "1", "18", "107", ...), "category" => StructCategory, "categoryID" => null))
181         <!-- SIDEBAR -->
182         <div class="col-md-3 col-xs-3 hidden-sm">
183             <?php
184             if (isset($existingCategories)) {
185                 if ( ! isset($early)) {
186                     echo $this->renderPartial('application.views.templates.catalog._catalogmenu', compact('existingCategories', 'category', 'categoryID'));
187                 } else {
188                     echo $this->renderPartial('application.views.templates.catalog._catalogmenu2', compact('existingCategories', 'category'));
189                 }
190             } else {
191                 $this->widget('application.modules.struct.StructMenu', array(
#4
+
 /var/www/lifedeco/data/www/lifedeco.kz/protected/views/category.php(45): include("/var/www/lifedeco/data/www/lifedeco.kz/protected/views/templates...")
40         $parent = $parent->parent;
41     }
42 }
43 
44 // подгрузка шаблона
45 include '/'.Yii::app()->struct->getTemplatePath('category', $template);
46 
47 
#9
+
 /var/www/lifedeco/data/www/lifedeco.kz/protected/extensions/extcore/ExtCoreController.php(227): CController->render("/category", array("categoryID" => null, "predzakaz" => 1, "category" => StructCategory, "existingCategories" => array("702", "1", "18", "107", ...), ...), false)
222 
223     public function render($view, $data=null, $return=false)
224     {
225         if(Yii::app()->request->isAjaxRequest)
226              return $this->renderPartial($view, $data, $return);
227         else return parent::render($view, $data, $return);
228     }
229     
230 /*
231     public function render($view, $data=null, $return=false)
232     {
2024-03-28 23:31:59 Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips mod_fcgid/2.3.9 PHP/7.1.33 Yii Framework/1.1.14