Error

Description

Call to a member function imageurlfirst() on null

Source File

/home/pdcge/public_html/protected/Pages/Frontend/Personne.php (17)

0006: 
0007:     public function onLoad($param)
0008:     {
0009:         parent::onLoad($param);
0010: 
0011:         if ($type=$this->request['id']){
0012:             $this->personne = PersonneRecord::finder()->findbyPk($this->request['id']);
0013:         }else{
0014:             
0015:         }
0016:         $this->TitrePage->Controls[] = $this->personne->pers_Nom.' '.$this->personne->pers_Prenom;
0017: $this->image->ImageUrl = $this->personne->imageurlfirst('M');
0018: $this->image->AlternateText = $this->personne->imagealtfirst(); 0019: $this->description->text = $this->personne->pers_Description; 0020: $poste = $this->personne->poste; 0021: array_walk($poste,function($el){ 0022: if($el->secteur->sec_ID == 2 or $el->secteur->sec_ID == 1){ 0023: $el->affichage = $el->responsabilite; 0024: }elseif($el->secteur->dom_ID == 8){ 0025: $el->affichage = 'CODIR | '.$el->responsabilite; 0026: }else{ 0027: $el->affichage = $el->secteur.' | '.$el->responsabilite; 0028: } 0029: });

Stack Trace

#0 /home/pdcge/public_html/protected/vendor/pradosoft/prado/framework/Web/UI/TControl.php(1334): Personne->onLoad(NULL)
#1 /home/pdcge/public_html/protected/vendor/pradosoft/prado/framework/Web/UI/TPage.php(228): Prado\Web\UI\TControl->loadRecursive()
#2 /home/pdcge/public_html/protected/vendor/pradosoft/prado/framework/Web/UI/TPage.php(208): Prado\Web\UI\TPage->processNormalRequest(Object(Prado\Web\UI\THtmlWriter))
#3 /home/pdcge/public_html/protected/vendor/pradosoft/prado/framework/Web/Services/TPageService.php(528): Prado\Web\UI\TPage->run(Object(Prado\Web\UI\THtmlWriter))
#4 /home/pdcge/public_html/protected/vendor/pradosoft/prado/framework/Web/Services/TPageService.php(465): Prado\Web\Services\TPageService->runPage(Object(Personne), Array)
#5 /home/pdcge/public_html/protected/vendor/pradosoft/prado/framework/TApplication.php(1190): Prado\Web\Services\TPageService->run()
#6 /home/pdcge/public_html/protected/vendor/pradosoft/prado/framework/TApplication.php(382): Prado\TApplication->runService()
#7 /home/pdcge/public_html/index.php(188): Prado\TApplication->run()
#8 {main}
2019-07-15 22:43 Apache PRADO/4.0.1