PHP warning

Trying to access array offset on value of type null

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

153                         $this->redirect('?r=Site/processcart');
154                     } else {
155                         Yii::app()->session['user'] = $current_user;
156                         $this->redirect('?r=Dashboard');
157                     }
158                 } else {
159                     Yii::app()->user->setFlash('loginerror', '<div class="alert alert-danger alert-dismissible fade in msg" role="alert"><button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">×</span></button>Invalid login! Please Check Username and password</div>');
160                 }
161             } else {
162                 
163             }
164         }
165         if (Yii::app()->session['user']['role'] == '1') {
166             $this->redirect('?r=Dashboard');
167         } else if (Yii::app()->session['user']['role'] == '2') {
168             $this->redirect('?r=Site/myaccount');
169         }
170 
171         $this->render('login', array('model' => $model));
172     }
173 
174     public function actionMobilelogin() {
175         $this->pageTitle = 'Account Login';
176         $user = new User;
177         //print_r($_POST);

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 23:33:43 Apache Yii Framework/1.1.15