TypeError

htmlspecialchars(): Argument #1 ($string) must be of type string, array given

/var/www/hosts/framework/web/helpers/CHtml.php(103)

091      */
092     private static $_modelNameConverter;
093 
094     /**
095      * Encodes special characters into HTML entities.
096      * The {@link CApplication::charset application charset} will be used for encoding.
097      * @param string $text data to be encoded
098      * @return string the encoded data
099      * @see http://www.php.net/manual/en/function.htmlspecialchars.php
100      */
101     public static function encode($text)
102     {
103         return htmlspecialchars($text,ENT_QUOTES,Yii::app()->charset);
104     }
105 
106     /**
107      * Decodes special HTML entities back to the corresponding characters.
108      * This is the opposite of {@link encode()}.
109      * @param string $text data to be decoded
110      * @return string the decoded data
111      * @see http://www.php.net/manual/en/function.htmlspecialchars-decode.php
112      * @since 1.1.8
113      */
114     public static function decode($text)
115     {

Stack Trace

#4
+
–
 /var/www/hosts/lk.usoft.ru/protected/modules/videoseminars/components/views/RandomLessonWidget.php(58): CHtml::image()
53 <div>
54     <?php foreach ($model as $videoseminar): ?>
55         <div class="row mrg-t-30">
56             <div class="span5">
57                     <a href="<?= Yii::app()->createUrl($module_url . $videoseminar->id); ?>" class="mrg-r-10 show-block">
58                         <?php echo CHtml::image($videoseminar->thumbnails, array('width'=>'100%')) ?>
59                     </a>
60             </div>
61             <div class="span7">
62                     <h5 class="mrg-0"><?php echo CHtml::link($videoseminar->title, Yii::app()->createUrl($module_url . $videoseminar->id)) ?></h5>
63             </div>
#8
+
–
 /var/www/hosts/lk.usoft.ru/protected/modules/videoseminars/components/InfoBlockWidget.php(72): CWidget->render()
67             }
68             $criteria->limit = $this->limit ? $this->limit : (int)Yii::app()->config->get('VideoSem.block.limit');
69             $criteria->order = $this->order;
70 
71             if (count($data = $model->actual()->findAll($criteria))) {
72                 $this->render($this->viewFile, array('params' => $this->params, 'model' => $data));
73             }
74         }
75     }
76 }
#10
+
–
 /var/www/hosts/lk.usoft.ru/protected/views/frontend/education.php(38): CBaseController->widget()
33                     </a>
34                 </div>
35             <?php endif; ?>
36 
37 
38             <?php $this->widget('application.modules.videoseminars.components.InfoBlockWidget', array(
39                 'order' =>' RAND() ',
40                 'viewFile' =>'RandomLessonWidget',
41                 'category'=>true,
42                 'limit' => 3,
43                 'category_id' =>0
2026-11-08 19:07:18 nginx/1.18.0 Yii Framework/1.1.15