Keyword

Error Message after upgrade to php8.0-fpm

  • Alfons Flatscher
  • Alfons Flatscher's Avatar Topic Author
  • Offline
  • New Member
More
1 year 9 months ago #178576 by Alfons Flatscher
Error Message after upgrade to php8.0-fpm was created by Alfons Flatscher
We use K2 for our joomla website. After upgrading to php8.0-fpm (we run on nginx) we encountered issues. Whenever we open a K2-Item the following error message appears:
> 0 count(): Argument #1 ($var) must be of type Countable|array, null given
> It appears the page you were looking for doesn't exist. Sorry about that.

When opening other post created for examle with easyblog they display just fine.
Any ideas?

Please Log in or Create an account to join the conversation.

More
1 year 9 months ago #178585 by JoomlaWorks
Replied by JoomlaWorks on topic Error Message after upgrade to php8.0-fpm
This is most likely an outdated K2 template override. Switch error reporting in Joomla's Global Configuration to maximum to see the exact file and line that this error occurs in.

In most cases it's just a matter of checking if an array is set before counting its items.

So if you have something like:
if (count($items)) {
    // do something, e.g. run a "foreach" loop
}

change it to:
if (isset($items) && count($items)) {
    // do something, e.g. run a "foreach" loop
}

Fotis / JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.

  • MercurioWeb WebStudio
  • MercurioWeb WebStudio's Avatar
  • Offline
  • New Member
More
3 weeks 2 days ago #180637 by MercurioWeb WebStudio
Replied by MercurioWeb WebStudio on topic Error Message after upgrade to php8.0-fpm
Hi, I too have the same problem with php 8.1, in which file can I find the code to correct?

Please Log in or Create an account to join the conversation.

More
2 weeks 5 days ago #180644 by JoomlaWorks
Replied by JoomlaWorks on topic Error Message after upgrade to php8.0-fpm

Fotis / JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.

  • MercurioWeb WebStudio
  • MercurioWeb WebStudio's Avatar
  • Offline
  • New Member
More
1 week 5 days ago #180698 by MercurioWeb WebStudio
Replied by MercurioWeb WebStudio on topic Error Message after upgrade to php8.0-fpm
Hi, I update K2 installing the file downloaded from getk2.org/downloads/?f=K2_Rolling_Release.zip
but nothing change, in the blog page appear this error:

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

Please Log in or Create an account to join the conversation.

More
1 week 5 days ago #180700 by JoomlaWorks
Replied by JoomlaWorks on topic Error Message after upgrade to php8.0-fpm
This error comes from a K2 override or other Joomla module or plugin.

Open the Joomla debugger and switch error reporting to maximum to identify the exact origin of the error.

Fotis / JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.

More
1 week 3 days ago - 6 days 10 hours ago #180707 by Vieru
Replied by Vieru on topic Error Message after upgrade to php8.0-fpm
Hello.

after the last K2 upgrade, the following error appears:
0 count(): Argument #1 ($value) must be of type Countable|array, null given
/home/.../public_html/plugins/system/lscache/components/com_k2 . php:46

The error is only when saving and closing an article written in k2 or when clicking the close button.
When disabling the Litespeed plugin, the error disappears.

Last K2, Jomla 3, Litespeed plugin

What can be done?
Last edit: 6 days 10 hours ago by Vieru.

Please Log in or Create an account to join the conversation.

More
1 week 3 days ago #180708 by amir
there is error in k2.11 after upgrade to php8.0When I hit publish or unpublish button in k2 content
error : Attempt to assign property "id" on null
please review and help me to fix it

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum