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

Fatal error in host list, when logging in with user without any user group

XMLWordPrintable

    • S24-W16/17, S24-W18/19
    • 0.5

      Steps to reproduce:

      1. Create user with NO user group and Admin or lower permissions.
      2. Login with this user.
      3. Go to Data Collection -> Hosts

      Result:
      Fatal error.

      NOTICE: PHP message: PHP Fatal error:  Uncaught TypeError: array_column(): Argument #1 ($array) must be of type array, string given in /var/www/html/branches/master/ui/include/items.inc.php:2684
      Stack trace:
      #0 /var/www/html/branches/master/ui/include/items.inc.php(2684): array_column('0', 'rowscount', 'hostid')
      #1 /var/www/html/branches/master/ui/app/controllers/CControllerHostList.php(263): getItemTypeCountByHostId(7, Array)
      #2 /var/www/html/branches/master/ui/include/classes/mvc/CController.php(478): CControllerHostList->doAction()
      #3 /var/www/html/branches/master/ui/include/classes/core/ZBase.php(639): CController->run()
      #4 /var/www/html/branches/master/ui/include/classes/core/ZBase.php(233): ZBase->processRequest(Object(CRouter))
      #5 /var/www/html/branches/master/ui/include/config.inc.php(25): ZBase->run('default')
      172.22.0.4 - galieleo 04/Apr/2024:13:19:37 +0000 "GET /branches/master/ui/zabbix.php" 500
      #6 /var/www/html/branches/master/ui/zabbix.php(22): require_once('/var/www/html/b...')
      #7 \{main}
        thrown in /var/www/html/branches/master/ui/include/items.inc.php on line 2684

      Expected:
      No error, empty host list should be open.

       

      Error is present because ui/include/items.inc.php:2677 return string. This in tur is caused due to changes with 'ugset' parameter in ui/include/classes/api/services/CItem.php:158

            zabbix.dev Zabbix Development Team
            epulke Elina Pulke
            Team A
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: