PHP warning

array_keys() expects parameter 1 to be array, bool given

/var/www/rozetkimertensu/data/www/rozetki-merten.su/protected/controllers/SeriesController.php(517)

505 
506                 //Проверка обязательного цвета
507 
508                 if (empty($dColor)){
509 
510                     $currentDigit = Categories::model()->find(array('condition' => '`brand`=' . $brand . ' and disp = 1 and `id` in ('.$catsdigitals.')' , 'order' => '`device`,`order_device`,`name` ASC'));
511                     if (!empty($currentDigit->series)) {
512                         $broDigitColors = Categories::model()->findAll(array('condition' => '`brand`=' . $brand . ' and disp = 1 and device!=1 and id_parent=' . $currentDigit->id_parent, 'order' => '`device`,`order_device`,`name` ASC'));
513                     }else{
514 
515                         $colorPicsData = $frameCategory->color_pics;
516                         $colorPics = unserialize($colorPicsData);
517                         $colorIDs = array_keys($colorPics);
518 
519                         $broDigitColors = Categories::model()->findAll(array('condition' => '`brand`=' . $brand . ' and disp = 1 and device!=1 and colordigital IN ' . sprintf('(%s)', join(',', $colorIDs)), 'order' => '`device`,`order_device`,`name` ASC'));
520                     }
521 
522                     $catsdigitals = '';
523                     foreach ($broDigitColors as $item){
524 
525                         $catsdigitals .= empty($catsdigitals) ? $item->id : ','.$item->id;
526 
527                     }
528                 }
529 

Stack Trace

#0
+
 /var/www/rozetkimertensu/data/www/rozetki-merten.su/protected/controllers/SeriesController.php(517): array_keys(false)
512                         $broDigitColors = Categories::model()->findAll(array('condition' => '`brand`=' . $brand . ' and disp = 1 and device!=1 and id_parent=' . $currentDigit->id_parent, 'order' => '`device`,`order_device`,`name` ASC'));
513                     }else{
514 
515                         $colorPicsData = $frameCategory->color_pics;
516                         $colorPics = unserialize($colorPicsData);
517                         $colorIDs = array_keys($colorPics);
518 
519                         $broDigitColors = Categories::model()->findAll(array('condition' => '`brand`=' . $brand . ' and disp = 1 and device!=1 and colordigital IN ' . sprintf('(%s)', join(',', $colorIDs)), 'order' => '`device`,`order_device`,`name` ASC'));
520                     }
521 
522                     $catsdigitals = '';
#15
+
 /var/www/rozetkimertensu/data/www/rozetki-merten.su/index.php(61): CApplication->run()
56 // remove the following line when in production mode
57 defined('YII_DEBUG') or define('YII_DEBUG',true);
58 
59 ob_start();
60 require_once($yii);
61 Yii::createWebApplication($config)->run();
62 $res = ob_get_clean();
63 if(!isset($_SERVER['HTTP_X_REQUESTED_WITH']) || $_SERVER['HTTP_X_REQUESTED_WITH'] !== 'XMLHttpRequest'){
64 
65     $prepareData = true;
66 
2024-03-28 23:47:49 Apache/2.4.41 (Ubuntu) Yii Framework/1.1.13