e107inc / e107

e107 Bootstrap CMS (Content Management System) v2 with PHP, MySQL, HTML5, jQuery and Twitter Bootstrap. Issue Discussion Room: https://gitter.im/e107inc/e107
https://e107.org
GNU General Public License v3.0
318 stars 212 forks source link

[Bug]: Comments without ajax issue #5111

Closed Jimmi08 closed 7 months ago

Jimmi08 commented 7 months ago

What e107 version are you using?

Latest Github version (just updated)

Bug description

This is just a note for anybody who can test it.

When you use comments without ajax (from any reason, in my case temp test in WordPress environment), comments are not saved in PHP 8 and the reason is this:

image

It failed in PHP 8 because this variable wasn't set.

How to reproduce

Use comments without Ajax.

I am aware that this is hard to reproduce and I will extend this issue if I have time for this.

The problem is deeper and I just wanted to save what I found. Adding this line $comment_share = 0; //BC Fix. fixed issue and comment was saved.

Expected behavior

Working comment system without AJAX. Ajax is fine but as soon as your site produces any error, it is not working.

What browser(s) are you seeing the problem on?

Chrome / Brave

PHP Version

8.1