Update to php7 and get some warning

I recently update my phpvms to the 5.5.72 version and the php tp 7.2, and i get this warning in the statistics table

Warning: count(): Parameter must be an array or an object that implements Countable in /home/u827720769/domains/cubana-va.com/public_html/lib/skins/blueIce/frontpage_main.php on line 125

Any help is welcome

What is line 125 of the lib/skins/blueIce/frontpage_main.php for you? Is this BlueIce v2 or v1? If it’s v2, then you might change to the phpVMS 5.5.2.72 version here

//forum.phpvms.net/applications/core/interface/index.html

Or otherwise might be able to assist.

 

 

 

 

And if what web541 recommends doesn’t work, post the contents of blueIce/frontpage_main.php to include lines 120-140. That should give us enough info to go on. The “count” warning is one that shows up a lot in files that aren’t completely php 7.2 compatible. Usually its a pretty easy fix. But first, be sure you are using the latest version of the blueIce skin (cause if you are not, you will get other errors in phpVMS 5.5.2.72 as well.

7 hours ago, eediaz said:

I recently update my phpvms to the 5.5.72 version and the php tp 7.2, and i get this warning in the statistics table

Warning: count(): Parameter must be an array or an object that implements Countable in /home/u827720769/domains/cubana-va.com/public_html/lib/skins/blueIce/frontpage_main.php on line 125

Any help is welcome

What is on your line 125? I dont see any errors on http://cubana-va.com

14 hours ago, flyalaska said:

What is on your line 125? I dont see any errors on http://cubana-va.com

in that line i have this,

<td>Pilots Pending:</td>
<td><span class=“counter”><?php echo count(PilotData::GetPendingPilots())?></span>
</td>

when the conut is not 0 there is no warning

10 hours ago, eediaz said:

in that line i have this,

<td>Pilots Pending:</td>
<td><span class=“counter”><?php echo count(PilotData::GetPendingPilots())?></span>
</td>

when the conut is not 0 there is no warning

Try this

 

\<td\>Pilots Pending:\</td\> \<td\>\<span class="counter"\> \<?php if(is\_array (PilotData::GetPendingPilots()) || PilotData::GetPendingPilots() instanceof Countable) { echo count(PilotData::GetPendingPilots()) } ?\> \</span\> \</td\>

 

1 Like

Solved with that code Thanks

10 minutes ago, eediaz said:

Solved with that code Thanks

You can thank ProAvia