PHP warning

Illegal string offset 'description'

/var/www/vhosts/kcp.kz/httpdocs/protected/views/templates/purchase/template.php(128)

116                                         ?>
117                                         <!-- begin item purchase -->
118                                         <?php if(sizeof($files) > 1):?>
119                                         <div href="#" class="block-link">
120                                                             <span class="link-date">
121                                                                 <span class="date-day"><?= Yii::app()->dateFormatter->format('d', $item->date_display);?></span>
122                                                                 <span class="date-month"><?= Yii::app()->dateFormatter->format('MMM', $item->date_display); ?></span>
123                                                             </span>
124                                             <div class="block-link-text"><?= $item->title; ?></div>
125                                             <ul class="block-link-list">
126                                                 <?php foreach ($files as $file):
127                                                     $fileUrl = $storage->createUrl($file, 'original')?>
128                                                     <li class="link-item"><a href="#" data-toggle="modal" data-target="#modal-download" data-filedesc="<?= $file['description']; ?>" data-filesize="(<?=  ''; //ceil(filesize($fileUrl) / (1024)); ?> kb)"
129                                                                              data-filepath="<?= $fileUrl; ?>"><?= $file['title']; ?></a><?= ''; //ceil(filesize($fileUrl) / (1024*1024)); ?></li>
130                                                 <?php endforeach; ?>
131                                             </ul>
132                                         </div>
133 
134                                         <?php else:
135                                             $fileUrl = $storage->createUrl($files[0], 'original');
136                                             $urlOpt = parse_url($fileUrl);
137 
138                                             if($item->id == 6873):
139                                                 $href = $fileUrl;
140                                                 $attributes = ' target="_blank"';

Stack Trace

#0
+
 /var/www/vhosts/kcp.kz/httpdocs/protected/views/category.php(10): include("/var/www/vhosts/kcp.kz/httpdocs/protected/views/templates/purcha...")
05 
06 // подгрузка шаблона
07 include Yii::app()->struct->getTemplatePath(
08     'category',
09     Yii::app()->struct->currentTemplate
10 );
#5
+
 /var/www/vhosts/kcp.kz/httpdocs/protected/extensions/extcore/ExtCoreController.php(215): CController->render("/category", array("items" => array(StructPage), "page" => "5", "pageCount" => 5, "pagination" => CPagination, ...), false)
210 
211     public function render($view, $data=null, $return=false)
212     {
213         if(Yii::app()->request->isAjaxRequest)
214              return $this->renderPartial($view, $data, $return);
215         else return parent::render($view, $data, $return);
216     }
217     
218 /*
219     public function render($view, $data=null, $return=false)
220     {
#6
+
 /var/www/vhosts/kcp.kz/httpdocs/protected/controllers/PurchaseController.php(34): ExtCoreController->render("/category", array("items" => array(StructPage), "page" => "5", "pageCount" => 5, "pagination" => CPagination, ...))
29         $items                                  = $dataProvider->data;
30         $pageCount                              = $dataProvider->pagination->pageCount;
31         $pagination                             = $dataProvider->pagination;
32         $pageSize                               = $this->pageSize;
33 
34         $this->render('/category', compact('items', 'page', 'pageCount', 'pagination', 'pageSize'));
35     }
36 
37 
38     /**
39      * Содание URL для ссылки на текущую категорию с текущими параметрами.
2024-03-28 22:57:34 Apache Yii Framework/1.1.13