Version: 1.5.2
PHP Version: 8.0
An exception is thrown when trying to display the modules (selection of the Modules Menu).
This MAY be because our server is using PHP 8.0 and some warnings are escalated to ERRORS.
Here are the details of the exception:
[PrestaShop] Fatal error in module file :/usr/share/hotelcommerce-1.5.2/classes/controller/AdminController.php:
Uncaught TypeError: method_exists(): Argument #1 ($object_or_class) must be of type object|string, bool given in /usr/share/hotelcommerce-1.5.2/classes/controller/AdminController.php:4171
Stack trace:
#0 /usr/share/hotelcommerce-1.5.2/classes/controller/AdminController.php(4171): method_exists()
#1 /usr/share/hotelcommerce-1.5.2/classes/controller/AdminController.php(4092): AdminControllerCore->displayModuleOptions()
#2 /usr/share/hotelcommerce-1.5.2/controllers/admin/AdminModulesController.php(1553): AdminControllerCore->fillModuleData()
#3 /usr/share/hotelcommerce-1.5.2/classes/controller/Controller.php(189): AdminModulesControllerCore->initContent()
#4 /usr/share/hotelcommerce-1.5.2/classes/Dispatcher.php(367): ControllerCore->run()
#5 /usr/share/hotelcommerce-1.5.2/admin375hurphk/index.php(58): DispatcherCore->dispatch() #6 {main} thrown
... and the offending code:
if (Validate::isModuleName($module->name)) {
if (method_exists(Module::getInstanceByName($module->name), 'reset')) {
$is_reset_ready = true;
}
}