Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+3 votes
1.1k views
in Themes by
Using Donut Theme 1.6.3.1 on Question2Answer 1.8.0 with PHP 7.2.3 I get the following warning:

Warning: count(): Parameter must be an array or an object that implements Countable in ... qa-donut-layer.php on line 1375

(BTW also there is a typo on the Donut Settings page - "Fist box text" instead of First..)

2 Answers

+2 votes
by
selected by
 
Best answer

I guess this is the line with the issue:

https://github.com/amiyasahu/Donut/blob/23aab78a3837a29b38139af2e61e9c8f7df8c303/qa-theme/Donut-theme/qa-donut-layer.php#L1376

Try replacing it with:

if (
  !empty($this->content['widgets'][$region][$place]) &&
  is_array($this->content['widgets'][$region][$place])
) {

It's a bit overkill but will fix the issue.

by
thank you for solution.. pupi1985.. can i get your contact detail for chat /?
by
You're welcome! Hmm... I don't think so... I think I have enough friends already :P

You can shoot me a private message and see where we get from there.
by
I have fixed this in latest version.
0 votes
by
reshown by
go to qa-theme/Donut-theme/qa-donut-layer.php

and edit line from

if (count($sub_navigation )) {
to
 if ( !empty( $sub_navigation ) ) {
by
This has been fixed in 2.0.1 version. thanks for reporting.
...