43 Posts
trip
2 years ago
1
Topic

Hi guys - we need an urgent resolution on this issue related to seblod.

We have 

Joomla 3.10.11
PHP 8.0.x/8.1.x

All parts of the cck work as expected

except when

Create new article, hit save and it results in this error

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

I see there are many extension providers who have this issue, but it is seriously a big problem

Could someone please revert back on a fix for this if they know what it is.

Thanks

Matt

Get a VIP membership
1 year ago
0
Level 1

I found a solution, however is not the best solution because you need to change the core.

Follow my solution after read php_erro.log. 

Important: Create a backup of this file before change. Do at first in development environment before change in production.

Go to /libraries/cck/base/list/list_inc.php

In error log, showed me some problems in this file in 3 lines.

Line 135

$variation = explode( '||', $variation);

change to

$variation = explode( '||', $variation ?? '');

Line 459

$total = count( $items );

change to

$total = count( (array)$items );

Line 743

$config['validation'] = ( count( $config['validation'] ) ) ? implode( ',', $config['validation'] ) : '';

change to

$config['validation'] = ( count( (array)$config['validation'] ) ) ? implode( ',', $config['validation'] ) : '';

---

Remember this solution is not the best. You have to change this until Seblod Staff fix this in forward versions.

Get a Book for SEBLOD