mltpilot Posted January 31, 2016 Report Posted January 31, 2016 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? Quote
AstroEdge Posted April 28, 2016 Report Posted April 28, 2016 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: astroedge@ground2air.org - Website: www.ground2air.org - YouTube: www.youtube.com/Ground2AirOrg - Twitter: www.twitter.com/Ground2AirOrg - Steam ID: AstroEdge Quote
gio1961 Posted April 28, 2016 Report Posted April 28, 2016 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> Quote
web541 Posted April 28, 2016 Report Posted April 28, 2016 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. 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.