Hello, I want to show the current location of the pilot on the schedule page (/index.php/schedules). As I know, I use the correct code, but on the Schedules page it does not show anything except the words "This pilot's last location is". But on other pages (Pilot Center, profile) with this code everything works fine.
<?php
$last_location = PIREPData::getLastReports($userinfo->pilotid, 1, PIREP_ACCEPTED);
echo "This pilot's last location is: {$last_location->arricao}";
?>