TypeError

count(): Argument #1 ($value) must be of type Countable|array, string given

/var/www/hosts/lk.usoft.ru/protected/modules/test/models/Tests.php(308)

296             $result = $this->limit * $this->time_limit;
297         }
298         return $result;
299 
300     }
301 
302     protected function afterFind()
303     {
304         parent::afterFind();
305         if ($this->question_limit) {
306             $this->limit = $this->question_limit;
307         } else {
308             $this->limit = $this->questionCount;
309         }
310 
311 
312     }
313 
314     protected function afterSave()
315     {
316         parent::afterSave();
317 
318         Yii::import('tags.models.Tag');
319         Tag::model()->updateAfterSave($this->tags);
320         /*

Stack Trace

#5
+
–
 /var/www/hosts/lk.usoft.ru/protected/modules/test/models/Tests.php(308): CActiveRecord->__get()
303     {
304         parent::afterFind();
305         if ($this->question_limit) {
306             $this->limit = $this->question_limit;
307         } else {
308             $this->limit = $this->questionCount;
309         }
310 
311 
312     }
313 
#10
+
–
 /var/www/hosts/lk.usoft.ru/protected/modules/test/components/TestsWidget.php(18): CActiveRecord->findAll()
13     {
14         Yii::app()->getModule('test');
15         if($this->testId){
16             $test = Tests::model()->findByPk($this->testId);
17         } else{
18             $model = Tests::model()->findAll('visible=1 AND access="" AND pul is NULL AND (dt_stop is NULL OR dt_stop >= "'.date('Y-m-d H:i:s').'")');
19             if($this->random){
20                 $this->test_num = rand(1, sizeof($model));
21             }
22             $criteria=new CDbCriteria;
23             $criteria->addCondition('visible=1');
#13
+
–
 /var/www/hosts/lk.usoft.ru/protected/views/frontend/reminder.php(56): CBaseController->widget()
51             <div>
52             </div>
53 
54 
55             <div class="row remider mrg-b-30">
56                 <?php $this->widget('application.modules.test.components.TestsWidget', array('random' => true)); ?>
57                 <?php /* $this->widget('application.components.TestsWidget', array('random' => true)); */ ?>
58             </div>
59 
60             <?php if ($page['page_type'] !== 'navigator/pages/navigate'): ?>
61                 <div class="row mrg-b-30">
2026-11-08 19:07:38 nginx/1.18.0 Yii Framework/1.1.15