This is an error I encountered when I installed LANCE skin:
Warning: Invalid argument supplied for foreach() in/home/vistrojh/public_html/lib/skins/lance/frontpage_recentpilots.tplon line 3
How can I fix this?
This is an error I encountered when I installed LANCE skin:
Warning: Invalid argument supplied for foreach() in/home/vistrojh/public_html/lib/skins/lance/frontpage_recentpilots.tplon line 3
How can I fix this?
I am currently working on a solution for the problem, looks like it may just be faulty code but can’t tell. I will be sure to post an update when I find a solution!
Best Regards,
Ground2Air.org VA President - Trevor Edge
Email: [email protected]
Website: www.ground2air.org
YouTube: www.youtube.com/Ground2AirOrg
Twitter: www.twitter.com/Ground2AirOrg
Steam ID: AstroEdge
Hello, open file frontpage_recentpilots.tpl .. try this and see if it works … best regards
<ul style=“margin-top:10px; margin-left:3px;width:100%;” class=“list-group”>
<?php
if(!$pilots)
{
echo ‘<p>No pilot!</p>’;
return;
}
?>
<style type=“text/css”>
.ppp {
font-size: 12px;
}
</style>
<table>
<thead>
</thead>
<tbody>
<?php
foreach($pilots as $pilot)
{
?>
<tr>
<td align=“left”><img src=“<?php echo Countries::getCountryImage($pilot->location);?>” /></td>
<td align=“left”><span class=“ppp”><?php echo PilotData::GetPilotCode($pilot->code, $pilot->pilotid);?></span></td>
<td align=“left”><span class=“ppp”><?php echo $pilot->firstname . ’ ’ . $pilot->lastname; ?></span></td>
</tr>
<?php
}
?>
</tbody>
</table>
</ul>
Hello, open file frontpage_recentpilots.tpl .. try this and see if it works … best regards …
Um, he asked for the frontpage_recentpilots.tpl not the pilots_list.tpl
try changing this
foreach($pilot_list as $pilot) {
to this
foreach($pilots as $pilot) {
And see if it works. I believe that the variables have changed in the newer phpvms 5.5.x version therefore it will not work with your .tpl version and it’s a bug in the skin I believe.