Solved Templates

PHP 8.0 Error: 0 count(): Argument #1 ($value) must be of type Countable|array, null given

Asked by Matt 4 years ago Last activity 3 years ago

On the Finion template 2.0.1, HelixUltimate, Joomla 4, SPPB 3 PHP 8 I get a 500 error.

Error: 0 count(): Argument #1 ($value) must be of type Countable|array, null given

Accepted answer

Marked as the solution
Toufiq Senior Staff

Fixed this file

templates/finion/html/mod_login/default.php

11 more replies

Bert

Not sure if I can follow this post like this... But I also noticed the incompatibility and would like to follow up on this issue.

Is there a timeframe available or a roadmap of some sort that can inform us of the advances made in this area?

Thank you in advance.

Toufiq Senior Staff

Hi there,

Thanks for contacting us. Sorry for the inconvenience. Will you please provide me the Joomla administrator access to check the issue? I will check & get back to you soon. 

Note: Ariba is no longer working with us.

-Thanks

Bert

While under development, the site is currently located onto a private network and not accessible via internet.

The issue filed by Matt (see original query above) is still in place. Setting up our backend to use PHP 8.0 results in the same error as mentioned.

0
count(): Argument #1 ($value) must be of type Countable|array, null given

Everything works well with PHP 7.4 as stated in the technical requirements Ariba mentioned so it's as to be expected.

I'm wondering if Joomshaper will update the Finion template so it'll be compatible with PHP 8. And if so, what will be the timeframe (more or less) to do so.

Thank you in advance.

Matt Asked this

I don't have easy access to the hosting enviroment to switch PHP versions. We delivered that particular site and they are running PHP7.4 with the hopes of being able to switch to PHP 8 in the near future.

What I can do is pull a copy and set it up on one of our servers if it would help in getting an update to the template installation file that we could update on the live site. Let me know if that would be helpful and I'll get it setup.

Toufiq Senior Staff

Before update you should check everything from your staging site. How to create an staging site.

Please create an staging site before move your site PHP 8.

https://drive.google.com/file/d/1ms8hPQfM3xfF4XUO0W4pUZAhzGUqxBwD/view

  1. Create a subdomain from your cPanel
  2. Export your existing site Database from PHPMyAdmin
  3. Create a new Database
  4. Import the existing Database to the new Database
  5. Update configuration.php file
  6. Go to the administrator of the staging site
Toufiq Senior Staff

Problem solved. Check now. Thanks

Bert

Thank you, Toufiq! I hope this will find a way into a new version of the Finion template on the Joomshaper site. It might help others...

For you convenience Matt, I put a txt file with the content of this default.php file ready to download at https://mannaert.eu/downloads/default.txt

I assume you have no issues altering the php file.

Hope this helps.

Toufiq Senior Staff

We will fix it future update. Thanks

Log in to reply.