Error

[] operator not supported for strings

/home/heleneboisvert/public_html/themes/heleneboisvert/views/portfolio/portfolio_single.php(94)

082 
083                         <div class="line"></div>
084 
085                         <!-- Portfolio Single - Meta
086                         ============================================= -->
087                         <ul class="portfolio-meta bottommargin">
088                             <li><span><i class="icon-calendar3"></i>Date de création:</span> <?php $date = new DateTime($model->portfolio_date);
089                                   echo $date->format('d').' '.strftime("%b", strtotime($model->publish_date)).' '.$date->format('Y'); ?></li>
090                             <li><span><i class="icon-lightbulb"></i>Catégories:</span>    <?php
091                                 $categories = $model->categories;
092                                 $category_string = '';
093                                 foreach($categories as $category){
094                                     $category_string[] = $category->title;
095                                 }
096                                 if(is_array($category_string)){
097                                     $category_string = implode(' / ', $category_string);
098                                 }
099                                 echo $category_string;
100                             ?>
101                             </li>
102                             <?php if($model->client_name<>'') { ?>
103                             <li><span><i class="icon-link"></i>Client:</span> <a href="#"><?php echo $model->client_name; ?></a></li>
104                             <?php } ?>
105                         </ul>
106                         <!-- Portfolio Single - Meta End -->

Stack Trace

#4
+
 /home/heleneboisvert/public_html/protected/controllers/PortfolioController.php(47): CController->render("portfolio_single", array("model" => Portfolio))
42   * @param integer $id the ID of the model to be displayed
43   */
44   public function actionView($id)
45   {
46     $this->render('portfolio_single',array(
47       'model'=>$this->loadModel($id),
48     ));
49   }
50 
51   /**
52   * Lists all models.
#19
+
 /home/heleneboisvert/public_html/index.php(16): CApplication->run()
11 defined('YII_DEBUG') or define('YII_DEBUG',$env['yii_debug']);
12 // specify how many levels of call stack should be shown in each log message
13 defined('YII_TRACE_LEVEL') or define('YII_TRACE_LEVEL',$env['yii_trace_level']);
14 
15 require_once($env['yii']);
16 Yii::createWebApplication($config)->run();
2024-03-28 23:47:02 Apache Yii Framework/1.1.16