- Posts: 3
COMMUNITY FORUM
Error Message after upgrade to php8.0-fpm
- Alfons Flatscher
- Topic Author
- Offline
- New Member
Less
More
3 years 8 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?
> 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.
- JoomlaWorks
- Offline
- Admin
Less
More
- Posts: 6220
3 years 8 months ago #178585
by JoomlaWorks
Fotis / JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
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:
change it to:
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
- Offline
- New Member
1 year 11 months 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.
- JoomlaWorks
- Offline
- Admin
Less
More
- Posts: 6220
1 year 11 months ago #180644
by JoomlaWorks
Fotis / JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
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
- Offline
- New Member
1 year 11 months 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
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.
- JoomlaWorks
- Offline
- Admin
Less
More
- Posts: 6220
1 year 11 months ago #180700
by JoomlaWorks
Fotis / JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
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.
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.
- Vieru
- Offline
- New Member
Less
More
- Posts: 1
1 year 11 months ago - 1 year 11 months 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?
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: 1 year 11 months ago by Vieru.
Please Log in or Create an account to join the conversation.
- amir
- Offline
- New Member
Less
More
- Posts: 1
1 year 11 months ago #180708
by amir
Replied by amir on topic Error Message after upgrade to php8.0-fpm
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
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.