Error

Call to a member function getPath() on null

/home/alhayatm/public_html/protected/views/home/staffm.php(47)

35 <div class="my-img">
36     <div class="my-details">
37     <div class="container-fluid">
38         <div class="row">
39 <!--            <col-xs-12>-->
40 <!--            <h4 class="bold main-color my-name fx"-->
41 <!--                data-animate="slideInDown">--><?php //echo  yii::t('website' , 'staffm.personal.data.title')?><!--</h4>-->
42 <!--            </col-xs-12>-->
43         </div>
44         <div id="staffm_pdata" class="row">
45             <div class="col-sm-3 col-xs-12 text-center">
46                 <img id="stafm_img" class="fx"
47                      data-animate="fadeInLeft" alt="" src="<?php echo $staffModel->profileImg->getPath() ?>"
48                      alt="<?php echo $staffModel->getFullName(); ?>">
49                  <?php  if(count($staffModel->getAllVideos()) > 0)  :   ?>
50                 <a class="videos-number" href="<?php echo Yii::app()->createUrl('home/StaffVideos' , array('lang' =>
51                 Yii::app()->language , 'id' => $staffModel->id))?>"><?php echo Yii::t('website' , 'staffm.videos')?>  <span class="badge">
52                         <?php echo count($staffModel->getAllVideos())  ?> </span></a><br>
53                 <?php  endif ;   ?>
54             </div>
55             <div class="col-sm-4 col-xs-6 col-xxs-12 staffm_data">
56                  <h3><?php  echo  $staffModel->getFullName() ;  ?></h3>
57                 <ul class="list alt list-bookmark">
58                       <?php if(!empty($staffModel->date_of_birth)): ?>
59                     <li class="fx" data-animate="slideInDown"><strong><?php echo Yii::t('website', 'staff.dob'); ?>

Stack Trace

#4
+
 /home/alhayatm/public_html/protected/controllers/HomeController.php(673): CController->render("staffm", array("staffModel" => Staff, "banner" => Banner))
668             $staffModel->attributes = $_GET['Staff'];
669         }
670         $banner = CommonFunctions::getBanner('staff') ;
671         $this->render('staffm', array(
672             'staffModel' => $staffModel,
673             'banner' =>$banner,
674         ));
675     }
676 
677 
678 
#10
+
 /home/alhayatm/public_html/protected/components/Controller.php(323): CFilterChain->run()
318         $criteriaDoctor = new CDbCriteria();
319         $criteriaDoctor->order = 'id';
320         $criteriaDoctor->compare('job_id',Job::model()->find('title=:title',array('title'=>'Doctor'))->id);
321         $criteriaDoctor->compare('s_active' , 1) ;
322         $this->doctors = Staff::model()->findAll($criteriaDoctor);
323         $chain->run();
324     }
325 
326     public function redirect_to_uri($controller , $uri){
327         $controller->redirect($uri) ;
328     }
#13
+
 /home/alhayatm/public_html/protected/components/Controller.php(278): CFilterChain->run()
273 
274             }else{
275                 Yii::app()->language = 'en';
276             }
277         }
278         $chain->run();
279     }
280 
281     public function filterCheckAccess($chain){
282         if(Yii::app()->user->isGuest){
283             $this->redirect(array('home/login'));
2024-03-28 10:15:20 LiteSpeed Yii Framework/1.1.17