GKT001 Posted May 6, 2020 Report Posted May 6, 2020 (edited) Hello there, This code shows the pilot's latest flights. But I have a problem and gives fatal error to the person who has no flight. How do I fix this. Example; <?php PIREPS::publicroutesmap($userinfo->pilotid,10)?> public function publicroutesmap($pilotID,$limit='') { $this->title = 'Flight Map of'.$pilotID; $pireps = PIREPData::findPIREPS(array('p.pilotid' => $pilotID),$limit); if(!$pireps) { $this->set('message', 'There are no PIREPs for this pilot!!'); $this->render('core_error.tpl'); return; } $this->set('allschedules', $pireps); $this->show('flown_routes_map.php'); } Edited May 6, 2020 by GKT001 Quote
Strider Posted June 14, 2020 Report Posted June 14, 2020 (edited) what line is 528? Edited June 14, 2020 by Strider Quote
mahir Posted June 15, 2020 Report Posted June 15, 2020 Try replacing $this->render('core_error.tpl'); with $this->show('core_error.tpl'); Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.