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 628 forks source link

Fix PHP8 bugs #937

Closed trentwiles closed 1 year ago

trentwiles commented 2 years ago

Solves "Uncaught TypeError: array_key_exists()" when captcha is enabled.

pupi1985 commented 2 years ago

You haven't provided steps to replicate the issue so I can't test this myself but is this happening in the bugfix branch?

yerbol89 commented 2 years ago

@pupi1985 I'm use PHP 7.4.30 version. And i see error Warning: array_key_exists() expects parameter 2 to be array, null given in /var/www/stud.baribar.kz/data/www/surak.baribar.kz/qa-include/app/captcha.php on line 85 https://surak.baribar.kz/690390/ User login in not views error. The user without logging in to the site can see an error on the page.

pupi1985 commented 2 years ago

I believe I've fixed this in my other branch: https://github.com/pupi1985/question2answer/commits/bugfix-pupi1985