q2a / question2answer

Question2Answer is a free and open source platform for Q&A sites, running on PHP/MySQL.
http://www.question2answer.org/
GNU General Public License v3.0
1.63k stars 629 forks source link

Unable to add category as superadmin #882

Closed mthan160 closed 3 years ago

mthan160 commented 3 years ago

To replicate:

  1. Fresh install of Q2A
  2. Access as superadmin
  3. Go to Admin > Categories > Add Category
  4. Receive HTTP ERROR 500

Error log: [php:notice] [pid 19172] [client 127.0.0.1:39388] PHP Fatal error: Uncaught TypeError: count(): Argument #1 ($var) must be of type Countable|array, null given in /home/x/lampstack-8.0.1-0/apache2/htdocs/qa/qa-include/pages/unanswered.php:39\nStack trace:\n#0 /home/x/lampstack-8.0.1-0/apache2/htdocs/qa/qa-include/app/page.php(187): require()\n#1 /home/x/lampstack-8.0.1-0/apache2/htdocs/qa/qa-include/qa-page.php(47): qa_get_request_content()\n#2 /home/x/lampstack-8.0.1-0/apache2/htdocs/qa/qa-include/qa-index.php(188): require('...')\n#3 /home/x/lampstack-8.0.1-0/apache2/htdocs/qa/index.php(27): require('...')\n#4 {main}\n thrown in /home/x/lampstack-8.0.1-0/apache2/htdocs/qa/qa-include/pages/unanswered.php on line 39, referer: http://127.0.0.1:8080/qa/index.php?qa=admin&qa_1=lists

pupi1985 commented 3 years ago

Please, check if these changes fix the issue. Thanks.

svivian commented 3 years ago

It fixed the issue for me, merged into the bugfix branch.

mucahitozel55 commented 2 years ago

Thank you so much @pupi1985 it fixed my issue.

update20221 commented 2 years ago

how to find this option??my askask face this problem