ryanhowdy / fcms

Family Connections - Create a private family website.
http://www.familycms.com
GNU General Public License v2.0
82 stars 41 forks source link

Error count(): Parameter must be an array or an object that implements Countable in PHP 7.3.7 #608

Open ryanhowdy opened 4 years ago

ryanhowdy commented 4 years ago

Assigned to Problems, Issues and Bugs #38659. As reported in Tender:

Hello,

I am hosting FC internally on my NAS. After recent upgrade of the box, it got PHP 7.3.7 and I run into problems.
It started with blank, white page, instead login page, so I was not able to do anything. I found the reason - now ImageCreateFromBMP is the name of sunctio provided by PHP, so it could not be re-initiated. I renamed the function in inc/utils.php; inc/image_class.php and inc/Upload/Destination.php.
I am able to login.
The site seems to work properly, but it desplays error: PHP Error count(): Parameter must be an array or an object that implements Countable on home.php, familytree.php.
I understand it is caused by the new way of handling non-countable values for count() in PHP.
Unfortunately I don't know how to fix it. Is it an easy way of doing it?

Thanks in advance!
Best Regards, yareq