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]: PHP Fatal error when creating poll using PHP 8.2+ #5271

Open Moc opened 3 weeks ago

Moc commented 3 weeks ago

What e107 version are you using?

Latest Github version (just updated)

Bug description

When creating a poll, a PHP Fatal error is thrown:

Fatal error: Uncaught Error: Call to a member function getController() on null in ...\form_handler.php:4542 
Stack trace: 
#0 ...\e107_handlers\form_handler.php(4738): e_form->columnSelector(Array, Array) 
#1 ...\e107_plugins\poll\admin_config.php(192): e_form->thead(Array, Array) 
#2 ...\e107_plugins\poll\admin_config.php(101): poll_list() #3 {main} thrown in ...\form_handler.php on line 4542

How to reproduce

  1. Install Poll plugin
  2. Create poll by entering fields and hitting 'Preview'
  3. Hit 'create' button

Expected behavior

No PHP error and poll to be created

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

Chrome / Brave

PHP Version

PHP 8.2 and 8.3