PHP warning

Trying to access array offset on value of type null

/home/abc_pub/abcpublication.in/protected/controllers/SiteController.php(718)

706             echo 'Please enter valid review';
707         }
708     }
709 
710     public function actionSalesnetwork() {
711         $this->pageTitle = 'Sales Network';
712         $this->render('salesnetwork');
713     }
714 
715     public function actionMyaccount() {
716         $transaction = new Transcation;
717         $order = new Orders;
718         $id = Yii::app()->session['user']['id'];
719         $connection = Yii::app()->db;
720         $command = $connection->createCommand();
721         $command->select('orders.oid,orders.created,sum(transcation.item_price*transcation.item_quantity) as sum');
722         $command->from('orders');
723         $command->join('transcation', 'orders.oid=transcation.oid');
724         $command->where('orders.id=:id', array(':id' => $id));
725         $command->group('orders.oid');
726         $finddata = Yii::app()->db->createCommand("select o.*,t.* from orders o,transcation t where o.oid=t.oid and  o.id='$id' order by o.oid desc")->queryAll();
727         if (Yii::app()->session['user']['role'] != '2') {
728             $this->redirect('?r=Site/login');
729         }
730         $this->render('myaccount', array('orderlist' => $finddata, 'login_user' => Yii::app()->session['user']));

Stack Trace

#7
+
 /home/abc_pub/abcpublication.in/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-28 02:13:54 Apache Yii Framework/1.1.15