PHP warning

count(): Parameter must be an array or an object that implements Countable

/data/www/eurokontext.sk/sub/2017/protected/runtime/smarty/compiled/34b07973028e695a4226cbddca2e239be2325d2e.file.index.tpl.php(36)

24     'performanceTypes' => 0,
25     'Yii' => 0,
26     'performance' => 0,
27     'date' => 0,
28   ),
29   'has_nocache_code' => false,
30 ),false); /*/%%SmartyHeaderCode%%*/?>
31 <?php if ($_valid && !is_callable('content_5a98eec8ad99d5_69703634')) {function content_5a98eec8ad99d5_69703634($_smarty_tpl) {?><?php if (!is_callable('smarty_function_t')) include '/data/www/eurokontext.sk/sub/2017/protected/extensions/yiiext/renderers/smarty/plugins/function.t.php';
32 if (!is_callable('smarty_function_createUrl')) include '/data/www/eurokontext.sk/sub/2017/protected/extensions/codelessmess/smarty/plugins/function.createUrl.php';
33 if (!is_callable('smarty_modifier_truncate')) include '/data/www/eurokontext.sk/sub/2017/protected/vendor/Smarty/plugins/modifier.truncate.php';
34 ?><?php $_smarty_tpl->_capture_stack[0][] = array("headerContent", null, null); ob_start(); ?>
35     <div class="header-title-buttons hidden-xs">
36         <?php if (count($_smarty_tpl->tpl_vars['performances']->value[$_smarty_tpl->tpl_vars['type']->value])>0){?>
37             <?php  $_smarty_tpl->tpl_vars['type'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['type']->_loop = false;
38  $_from = $_smarty_tpl->tpl_vars['performanceTypes']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
39 foreach ($_from as $_smarty_tpl->tpl_vars['type']->key => $_smarty_tpl->tpl_vars['type']->value){
40 $_smarty_tpl->tpl_vars['type']->_loop = true;
41 ?>
42                 <a href="#<?php echo $_smarty_tpl->tpl_vars['type']->value;?>
43 " class="btn btn-default"><?php echo smarty_function_t(array('text'=>$_smarty_tpl->tpl_vars['type']->value,'cat'=>"performance"),$_smarty_tpl);?>
44 </a>
45             <?php } ?>
46         <?php }?>
47     </div>
48 <?php list($_capture_buffer, $_capture_assign, $_capture_append) = array_pop($_smarty_tpl->_capture_stack[0]);

Stack Trace

#0
+
 /data/www/eurokontext.sk/sub/2017/protected/vendor/Smarty/sysplugins/smarty_internal_templatebase.php(180): content_5a98eec8ad99d5_69703634(Smarty_Internal_Template)
175                         }
176                         array_unshift($_template->_capture_stack,array());
177                         //
178                         // render compiled template
179                         //
180                         $_template->properties['unifunc']($_template);
181                         // any unclosed {capture} tags ?
182                         if (isset($_template->_capture_stack[0][0])) {
183                             $_template->capture_error();
184                         }
185                         array_shift($_template->_capture_stack);
#1
+
 /data/www/eurokontext.sk/sub/2017/protected/extensions/yiiext/renderers/smarty/ESmartyViewRenderer.php(276): Smarty_Internal_TemplateBase->fetch()
271         /** @var Smarty_Internal_Template $template */
272         $template = $this->getSmarty()->createTemplate($sourceFile, null, null, $data, true);
273 
274         // render or return
275         if($return)
276             return $template->fetch();
277         else
278             $template->display();
279     }
280 
281     /**
#5
+
 /data/www/eurokontext.sk/sub/2017/protected/controllers/PerformanceController.php(32): CController->render("index", array("performanceTypes" => array("drama", "opera", "ballet"), "performances" => array("drama" => array(Performance, Performance, Performance, Performance, ...), "opera" => array(), "ballet" => array())))
27             $performancesByType[$performance->type][] = $performance;
28         }
29 
30         $this->render('index', array(
31             'performanceTypes' => $performanceTypes,
32             'performances' => $performancesByType,
33         ));
34     }
35 
36     public function actionView($slug)
37     {
2024-03-19 04:18:01 Apache/2.4.38 (Debian) Yii Framework/1.1.14