PHP warning

Creating default object from empty value

/home/simplyflow/domains/simplyflowers.com.sg/public_html/protected/controllers/SiteController.php(1268)

1256      * when an action is not explicitly requested by users.
1257      */
1258     public function actionDetails()
1259     {
1260         // renders the view file 'protected/views/site/index.php'
1261         // using the default layout 'protected/views/layouts/main.php'
1262         date_default_timezone_set('Asia/Singapore');
1263         $this->layout = 'line_dark';
1264         $product = new Product();
1265         if(isset($_GET['product_id'])){
1266             Yii::app()->user->setState('product',$_GET['product_id']); 
1267             $product = Product::model()->findByAttributes(array('product_id'=>$_GET['product_id']));
1268             $product->product_view += 1;
1269             $product->save();
1270             
1271         }
1272         
1273         $cart = Yii::app()->user->getState('cart');
1274         $item = new Item();
1275         
1276         if(isset($_GET['cart_id'])){
1277             $cart_id = $_GET['cart_id'];
1278             foreach($cart as $c){
1279                 if($c['cart_id'] == $cart_id){
1280                     if(isset($c['item_message']))

Stack Trace

#12
+
 /home/simplyflow/domains/simplyflowers.com.sg/public_html/index.php(13): CApplication->run()
08 defined('YII_DEBUG') or define('YII_DEBUG',true);
09 // specify how many levels of call stack should be shown in each log message
10 defined('YII_TRACE_LEVEL') or define('YII_TRACE_LEVEL',3);
11 
12 require_once($yii);
13 Yii::createWebApplication($config)->run();
2024-03-29 05:24:40 Apache/2 Yii Framework/1.1.20