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(310)

298         return $result;
299 
300     }
301 
302     protected function afterFind()
303     {
304         parent::afterFind();
305 
306         if ($this->question_limit) {
307             $this->limit = $this->question_limit;
308         } else {
309             // Приводим результат STAT-отношения к int
310             $this->limit = (int)$this->questionCount;
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         /*
321                 if ($this->isNewRecord) {
322                     $now = date("Y-m-d H:i:s");

Stack Trace

#5
+
–
 /var/www/hosts/lk.usoft.ru/protected/modules/test/models/Tests.php(310): CActiveRecord->__get()
305 
306         if ($this->question_limit) {
307             $this->limit = $this->question_limit;
308         } else {
309             // Приводим результат STAT-отношения к int
310             $this->limit = (int)$this->questionCount;
311         }
312     }
313 
314     protected function afterSave()
315     {
#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 21:37:46 nginx/1.18.0 Yii Framework/1.1.15