Uploaded image for project: 'ZABBIX BUGS AND ISSUES'
  1. ZABBIX BUGS AND ISSUES
  2. ZBX-18984

>>Required parameter $sql_parts follows optional parameter<< when running zabbix web on php 8.0.2

    XMLWordPrintable

    Details

    • Type: Problem report
    • Status: Closed
    • Priority: Critical
    • Resolution: Duplicate
    • Affects Version/s: 5.2.4
    • Fix Version/s: None
    • Component/s: Frontend (F)
    • Labels:
      None
    • Environment:

      Description

      Steps to reproduce:

      1. Open Dashboard (http://my.host/zabbix)
      2. Login as Administrator
      3. Open any page

      Result:

      Not on all `dashbrd-grid-widget` but on a lot, you get the following error output.

       

       Required parameter $sql_parts follows optional parameter $table_alias [zabbix.php:22 → require_once() → ZBase->run() → CSettingsHelper::getGlobal() → CSettingsHelper::loadParams() → API::getApiService() → CRegistryFactory->getObject() → CApiService->__construct() → CApiService->pk() → CApiService->getTableSchema() → CAutoloader->loadClass() → require() in include/classes/core/CAutoloader.php:77]
       Required parameter $sql_parts follows optional parameter $table_alias [zabbix.php:22 → require_once() → ZBase->run() → CSettingsHelper::getGlobal() → CSettingsHelper::loadParams() → API::getApiService() → CRegistryFactory->getObject() → CApiService->__construct() → CApiService->pk() → CApiService->getTableSchema() → CAutoloader->loadClass() → require() in include/classes/core/CAutoloader.php:77]
       Required parameter $sql_parts follows optional parameter $table_alias [zabbix.php:22 → require_once() → ZBase->run() → CSettingsHelper::getGlobal() → CSettingsHelper::loadParams() → API::getApiService() → CRegistryFactory->getObject() → CApiService->__construct() → CApiService->pk() → CApiService->getTableSchema() → CAutoloader->loadClass() → require() in include/classes/core/CAutoloader.php:77]
       Required parameter $sql_parts follows optional parameter $table_alias [zabbix.php:22 → require_once() → ZBase->run() → CSettingsHelper::getGlobal() → CSettingsHelper::loadParams() → API::getApiService() → CRegistryFactory->getObject() → CApiService->__construct() → CApiService->pk() → CApiService->getTableSchema() → CAutoloader->loadClass() → require() in include/classes/core/CAutoloader.php:77]
      

       

      I tried to find the right place, but couldn't find the function.

      I know that since php 8, there is a quite similar [deprecation](https://php.watch/versions/8.0/deprecate-required-param-after-optional) notice if a function defines a mandatory parameter after an optional.

      Apache `error_log` is silent so far. I am using apache with php-fpm.

      The error exists since I've upgraded to php 8 (because arch did it this way).

      Buzz me if you need more information.

      I was not able to find a repostiory for this code, could you please point me to it, if possible?

      Expected:

      No error is displayed.

        Attachments

        1. 0001-ZBX-18984-fixed.patch
          4 kB
          Stev Leibelt
        2. image-2021-02-08-10-16-35-370.png
          69 kB
          Stev Leibelt
        3. image-2021-02-08-10-17-30-178.png
          13 kB
          Stev Leibelt

          Issue Links

            Activity

              People

              Assignee:
              zabbix.dev Zabbix Development Team
              Reporter:
              artodeto Stev Leibelt
              Votes:
              2 Vote for this issue
              Watchers:
              6 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: