PHP 8.0 Error: 0 Count(): Argument #1 ($value) Must Be Of Type Countable|array, Null Given - Question | JoomShaper
Black Friday sale is live with flat 50% OFF. Sale ends soon! Grab your deal now!

PHP 8.0 Error: 0 Count(): Argument #1 ($value) Must Be Of Type Countable|array, Null Given

Matt

Matt

Template 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
0
12 Answers
Toufiq
Toufiq
Accepted Answer
Senior Staff 2 years ago #97399

Fixed this file

templates/finion/html/mod_login/default.php

0
Ariba
Ariba
Accepted Answer
Support Agent 3 years ago #86577

Hello

Thank you for your query. Could you please downgrade your PHP and check again? Finion is not compatible with PHP 8.0 yet, we will be working on that. You can see the technical requirements for the template below:

https://www.joomshaper.com/documentation/joomla-templates/finion/technical-requirements

0
B
Bert
Accepted Answer
2 years ago #97352

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.

0
Toufiq
Toufiq
Accepted Answer
Senior Staff 2 years ago #97358

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

0
B
Bert
Accepted Answer
2 years ago #97366

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.

0
Matt
Matt
Accepted Answer
2 years ago #97368

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.

0
Toufiq
Toufiq
Accepted Answer
Senior Staff 2 years ago #97372

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
0
B
Bert
Accepted Answer
2 years ago #97394

I've setup a copy on my personal domain.

See hidden content to log in at https://mannaert.eu/finion/administrator.

PHP version currently is PHP 8.0.26.

Tell me if anything else is required.

0
Toufiq
Toufiq
Accepted Answer
Senior Staff 2 years ago #97397

Problem solved. Check now. Thanks

0
B
Bert
Accepted Answer
2 years ago #97408

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.

0
Toufiq
Toufiq
Accepted Answer
Senior Staff 2 years ago #97417

We will fix it future update. Thanks

0
Matt
Matt
Accepted Answer
2 years ago #97427

Thanks @Bert!

0