Jump to content

Update to php7 and get some warning


eediaz

Recommended Posts

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

Link to comment
Share on other sites

  • Administrators

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.

Link to comment
Share on other sites

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

Edited by flyalaska
Link to comment
Share on other sites

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>

 

  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...