PHP notice

Undefined offset: 0

/home/site/aite/protected/controllers/ProductController.php(74)

62                         $active_cateid = $category['id'];
63                     }
64                     $sonCategorys[] = $category;
65                 }
66             }
67         }
68 
69         $status = Products::STATUS_SHOW;
70         $products = Products::model()->findAll('cat_id =:catid and status = :status',array(':catid' => $active_cateid,':status' => $status));
71 
72 
73 
74         $son_cat = $categorys[$productcat_id];
75 
76 //        $parent_cat = $categorys[$son_cat['parentid']];
77 
78 
79 //        echo $productcat_id;
80 //        var_dump($son_cat);exit;
81         $this->render('productlist',array(
82             'products' => $products,
83             'son_cat' => $son_cat,
84 //            'parent_cat' => $parent_cat,
85             'productcat_id'=>$productcat_id,
86             'sonCategorys'=>$sonCategorys,//子分类菜单

Stack Trace

#9
+
 /home/site/aite/index.php(49): CApplication->run()
44 $app = Yii::createWebApplication($config);
45 if (isset($_SERVER['HTTP_USER_AGENT']) && strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE 6.0') === false) {
46     $app->attachBehavior('WebBehavior', 'application.behavior.WebBehavior');
47 }
48 
49 $app->run();
2024-03-29 07:52:24 nginx/1.10.3 Yii Framework/1.1.14