QloApps Forums
    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular

    Exception displaying Module Information (Module Menu)

    Bug Report
    2
    4
    956
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • J
      jloper last edited by

      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;
      }
      }

      1 Reply Last reply Reply Quote 0
      • S
        shreesh Global Moderator last edited by

        Hi @jloper,

        QloApps is compatible with PHP 5.6 to 7.4. Currently, it does not support PHP 8.
        We recommend you please downgrade your PHP version to a compatible version of PHP.
        You can check the complete recommended configuration here (https://qloapps.com/install-qloapps/#section-8).

        J 1 Reply Last reply Reply Quote 0
        • J
          jloper @shreesh last edited by

          @shreesh

          I understand and expected that to be the answer. That is why I suggested that was the case in the original post.

          I am committed to (/stuck with) PHP 8.0. I am a developer. What is the process to help validate the code on PHP 8.0?
          I can certainly make the changes as I find the need.

          jloper

          1 Reply Last reply Reply Quote 0
          • S
            shreesh Global Moderator last edited by

            @jloper

            To make QloApps compatible with PHP 8, you can use a PHP compatibility check tool to update the deprecated and removed functions or you can cross-check PHP 8 changelog and update functions as required.

            We suggest you use a compatibility tool for easier migration to PHP 8.

            1 Reply Last reply Reply Quote 0
            • First post
              Last post