Skip to content

Conversation

@brianteeman
Copy link
Contributor

Using php 7.2 and above
Go to extensions->manage->database

Warning: count(): Parameter must be an array or an object that implements Countable in C:\htdocs\cms4\libraries\src\Schema\ChangeItem.php on line 214

Apply patch

no more warning

Go to extensions->manage->database

`Warning: count(): Parameter must be an array or an object that implements Countable in C:\htdocs\cms4\libraries\src\Schema\ChangeItem.php on line 214`

Apply patch

no more warning

try
{
$rows = $this->db->loadObject();
Copy link
Contributor

@wilsonge wilsonge May 9, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can remove the $rows=== false check directly below as loadRowList can only return an array (currently it's documented as returning null but that's just a doc block bug I've fixed with joomla-framework/database#122 - either way it can't be false)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This pr is the same as #18443 which was merged 5 months ago in 3.x but not merged in to 4.0 yet

@wilsonge
Copy link
Contributor

wilsonge commented May 11, 2018

That has just been merged in from staging :) - thanks though!

@wilsonge wilsonge closed this May 11, 2018
@brianteeman brianteeman deleted the countable-dbfix branch May 11, 2018 13:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants