Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+5 votes
568 views
in Plugins by

Fatal error: Uncaught TypeError: count(): Argument #1 ($var) must be of type Countable|array, null given in C:\xampp\htdocs\q2a\qa-include\qa-base.php(720) : eval()'d code:89 Stack trace: #0 C:\xampp\htdocs\q2a\qa-include\qa-base.php(720) : eval()'d code(46): qa_layer_9_from_layer_php->widgets('full', 'top') #1 C:\xampp\htdocs\q2a\qa-theme\SnowFlat\qa-theme.php(260): qa_layer_25_from_qa_wa_layer_php->widgets('full', 'top') #2 C:\xampp\htdocs\q2a\qa-include\qa-theme-base.php(390): qa_html_theme->body_content() #3 C:\xampp\htdocs\q2a\qa-include\qa-theme-base.php(270): qa_html_theme_base->body() #4 C:\xampp\htdocs\q2a\qa-include\qa-base.php(720) : eval()'d code(127): qa_html_theme_base->html() #5 C:\xampp\htdocs\q2a\qa-include\app\page.php(359): qa_layer_17_from_qa_poll_layer_php->html() #6 C:\xampp\htdocs\q2a\qa-include\qa-page.php(53): qa_output_content(Array) #7 C:\xampp\htdocs\q2a\qa-include\qa-index.php(188): require('C:\\xampp\\htdocs...') #8 C:\xampp\htdocs\q2a\index.php(27): require('C:\\xampp\\htdocs...') #9 {main} thrown in C:\xampp\htdocs\q2a\qa-include\qa-base.php(720) : eval()'d code on line 89

Link plugin:

https://github.com/q2a-projects/Q2A-Ultimate-Widgets

Thanks for you help

Q2A version: Ver 1.8.6
by
–1
Install PHP 7.

1 Answer

+1 vote
by
selected by
 
Best answer

Follow these steps:

1. Edit this line

2. Turn it from

if (count(@$this->content['widgets'][$region][$place])) {
to:
if (isset($this->content['widgets'][$region][$place]) && is_array($this->content['widgets'][$region][$place])) {
by
it worked

Thanks for you help
...