PHP notice

Trying to get property of non-object

/var/www/html/hai-o_rep_ie/protected/controllers/RepsiteController.php(451)

439             $first_color['color_code_desc']= "";
440             $from_category = 0;
441             $from_brand = 0;
442 
443             $product_model = new TocProducts;
444             $category_model = new TocCategories;
445             $list = new ZsList;
446             $product = $product_model->GetProductByID($id,$price_code,$company_code,$shipping_code);
447             $products_color_size = $product_model->ProductByColorSize($id); // return all product with color
448             $url_referrer_arr = explode('/',Yii::app()->request->urlreferrer);
449             if(isset($_GET['from']) && $_GET['from']=='brand'){
450                 $brand = EmBrand::model()->findByAttributes(array('f_code'=>$product['f_brand']));
451                 $breadcrumb = array(0=>array('name'=>$brand->f_url,'brand_name'=>$brand->f_code));
452                 $from_brand = 1;
453             } else {
454                 $breadcrumb = $category_model->list_product_breadcrumb($product['id']);
455                 $from_category = 1;
456             }
457         //echo "<pre>";print_r($breadcrumb);die;
458 
459             
460             if(empty($products_color_size[0]['products_id'])){
461                 $first_color = $product_model->ProductBySingleColor($id);
462                 $main_id = $first_color['products_main_id'];
463                 $type = $first_color['f_products_type'];

Stack Trace

#12
+
 /var/www/html/hai-o_rep_ie/index.php(20): CApplication->run()
15 defined('YII_DEBUG') or define('YII_DEBUG',true);
16 // specify how many levels of call stack should be shown in each log message
17 defined('YII_TRACE_LEVEL') or define('YII_TRACE_LEVEL',3);
18 
19 require_once($yii);
20 Yii::createWebApplication($config)->run();
2024-03-28 23:38:40 Apache Yii Framework/1.1.14