PHP warning

Trying to access array offset on value of type null

/home1/pushpcqz/public_html/pushpagiri.in/themes/user/views/department/details.php(7)

01 <section class="subPageGallery">
02     <div class="container sub-department-view-bg">
03         <div class="row">
04 
05             <div class="col-md-3 sidebar-main" id="sidebar">
06                 <div class="depDeatilDivActive">
07                     <img alt="" class="center-block" src="<?=Yii::app()->request->baseUrl?>/uploads/departments/<?=$details['image']?>">
08                     <h3><?=$details['title']?></h3>
09                 </div>
10                 <div class="depDeatilDiv">
11                     <h3>Other Departments</h3>
12                         <div class="scrollbar-inner depDeatilDiv-in">
13                         <? 
14                         $end=end($otherdep);
15                         foreach($otherdep as $key=>$val){?>
16                         <a class="depSideLink" href="<?=Yii::app()->params['site_url']?>departments/<?=$val['id']?>">
17                             <span><?=$val['title']?></span>
18                         </a>
19                         <? }?>

Stack Trace

#4
+
 /home1/pushpcqz/public_html/pushpagiri.in/protected/controllers/DepartmentController.php(142): CController->render("details", array("details" => null, "facilities_details" => array(), "dept_id" => "38", "otherdep" => array(Department, Department, Department, Department, ...)))
137         $otherdep=$model->findAll(array("condition"=>"id<>:id and status='1'","order"=>"title asc","params" => array(":id"=>$id)));
138 
139 
140         $model_facilities = new DepartmentFacilities();
141         $facilities_details=$model_facilities->findAll(array("condition"=>"dep_id=:id and status='1'","params" => array(":id"=>$id)));
142         $this->render("details",array('details'=>$details,'facilities_details'=>$facilities_details,'dept_id'=>$id,'otherdep'=>$otherdep));
143     }
144     
145     public function actionList()
146     {
147         $this->layout="subpage";
#14
+
 /home1/pushpcqz/public_html/pushpagiri.in/index.php(12): CApplication->run()
07 defined('YII_DEBUG') or define('YII_DEBUG',true);
08 // specify how many levels of call stack should be shown in each log message
09 defined('YII_TRACE_LEVEL') or define('YII_TRACE_LEVEL',3);
10 
11 require_once($yii);
12 Yii::createWebApplication($config)->run();
13 
14 
15 
16 
2024-03-19 15:34:04 Apache Yii Framework/1.1.14