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/controllers/SiteController.php(342): CActiveRecord->findAll()
337         Yii::import('application.modules.test.models.Questions');
338         $tests = Tests::model()
339             ->isAccess()
340             ->sort_ordered()
341             ->isPoolAccess()
342             ->findAll();
343         /* Для старого модуля
344          $tests = Yii::app()->db->createCommand()
345             ->select('id')
346             ->from('tests')
347             ->where('visible = 1')
#18
+
–
 /var/www/hosts/lk.usoft.ru/index.php(68): CApplication->run()
63 //Yii::setPathOfAlias('templates', $dirname_file .DIRECTORY_SEPARATOR.'templates');
64 Yii::setPathOfAlias('core', INDEX_DIR . DIRECTORY_SEPARATOR . 'core');
65 require_once(__DIR__ . DIRECTORY_SEPARATOR . 'protected' . DIRECTORY_SEPARATOR . 'vendors' . DIRECTORY_SEPARATOR . 'Loader.php');
66 Yii::registerAutoloader(array('Loader', 'systemMainAutoload'));
67 
68 Yii::createWebApplication($config_yii_path)->run();
2026-11-08 20:39:44 nginx/1.18.0 Yii Framework/1.1.15