flown_routes_map fatal error

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'); }

 what line is 528?

Try replacing 

 

$this->render(‘core_error.tpl’);

with

$this->show(‘core_error.tpl’);