How to fix Q2A-Ultimate-SEO Count() error in line 160
If you have installed Q2A-Ultmite-SEO plugin in your question2answer website then you might have encountered the error below. We are going to guide you on how to fix the error.
“PHP Warning: count(): Parameter must be an array or an object that implements Countable in /qa-include/qa-base.php(720) : eval()’d code on line 160”
This error occurs every time question page is loaded. Therefore, if you don’t solve it you error log file will become to large within a short time and eat up your disk space..
To fix the error above follow the procedure below.
- Open: qa-plugin/q2a-ultimate-seo/layer.php (this file is available inside q2a-ultimate-seo folder)
- Then go to line 160 of the file.
- Replace this line below
- With this line below
if(is_array(@$this->content['navigation']['cat']) && count(@$this->content['navigation']['cat'])
Be careful when copying the code above. Do not leave any spaces.
Kindly let me know in the comment section below whether this has solved the problem on your website.
Your feedback will help me know whether my solutions are working.