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

Undefined variable: config[...] in many forms

    XMLWordPrintable

    Details

      Description

      en:

      I watch a message like "Undefined variable: config [...]" on many forms:

      • Undefined variable: config[/var/www/webapps/zabbix/frontends/php/usergrps.php:383]
      • Undefined variable: config[/var/www/webapps/zabbix/frontends/php/media_types.php:242]
      • Undefined variable: config[/var/www/webapps/zabbix/frontends/php/auditlogs.php:235]
      • Undefined variable: config[/var/www/webapps/zabbix/frontends/php/auditlogs.php:247]
      • Undefined variable: config[/var/www/webapps/zabbix/frontends/php/hostgroups.php:362]
      • Undefined variable: config[/var/www/webapps/zabbix/frontends/php/hostgroups.php:388]
      • Undefined variable: config[/var/www/webapps/zabbix/frontends/php/templates.php:805]
      • Undefined variable: config[/var/www/webapps/zabbix/frontends/php/hosts.php:701]
      • Undefined variable: config[/var/www/webapps/zabbix/frontends/php/maintenance.php:629]
      • Undefined variable: config[/var/www/webapps/zabbix/frontends/php/actionconf.php:1332]
      • Undefined variable: config[/var/www/webapps/zabbix/frontends/php/screenconf.php:224]
      • Undefined variable: config[/var/www/webapps/zabbix/frontends/php/sysmaps.php:277]
      • Undefined variable: config[/var/www/webapps/zabbix/frontends/php/hostprofiles.php:93]

      Common diagnosis: use $config[] without pre-filling function select_config().

      List of files where this problem may be present:

      $ grep -c 'select_config(' `fgrep -R '$config[' frontends/php | sed -nr '/frontends\/php\//[email protected](^frontends/php/[^:]):.[email protected]\[email protected]' | uniq` | sed -nr '/:0$/s/([^:]):.$/\1/p'
      frontends/php/hostprofiles.php
      frontends/php/templates.php
      frontends/php/history.php
      frontends/php/actionconf.php
      frontends/php/proxies.php
      frontends/php/items.php
      frontends/php/triggers.php
      frontends/php/applications.php
      frontends/php/media_types.php
      frontends/php/maintenance.php
      frontends/php/usergrps.php
      frontends/php/auditacts.php
      frontends/php/screenconf.php
      frontends/php/auditlogs.php
      frontends/php/hostgroups.php
      frontends/php/graphs.php
      frontends/php/sysmaps.php
      frontends/php/hosts.php

      ru:

      ???????? ????????? ???? Undefined variable: config[...] ?? ?????? ??????:

      • Undefined variable: config[/var/www/webapps/zabbix/frontends/php/usergrps.php:383]
      • Undefined variable: config[/var/www/webapps/zabbix/frontends/php/media_types.php:242]
      • Undefined variable: config[/var/www/webapps/zabbix/frontends/php/auditlogs.php:235]
      • Undefined variable: config[/var/www/webapps/zabbix/frontends/php/auditlogs.php:247]
      • Undefined variable: config[/var/www/webapps/zabbix/frontends/php/hostgroups.php:362]
      • Undefined variable: config[/var/www/webapps/zabbix/frontends/php/hostgroups.php:388]
      • Undefined variable: config[/var/www/webapps/zabbix/frontends/php/templates.php:805]
      • Undefined variable: config[/var/www/webapps/zabbix/frontends/php/hosts.php:701]
      • Undefined variable: config[/var/www/webapps/zabbix/frontends/php/maintenance.php:629]
      • Undefined variable: config[/var/www/webapps/zabbix/frontends/php/actionconf.php:1332]
      • Undefined variable: config[/var/www/webapps/zabbix/frontends/php/screenconf.php:224]
      • Undefined variable: config[/var/www/webapps/zabbix/frontends/php/sysmaps.php:277]
      • Undefined variable: config[/var/www/webapps/zabbix/frontends/php/hostprofiles.php:93]

      ????? ???????: ???????????? $config[] ??? ??? ???????????????? ?????????? ???????? select_config().

      ?????? ?????? ??? ?????? ???????? ????? ??????????????:

      $ grep -c 'select_config(' `fgrep -R '$config[' frontends/php | sed -nr '/frontends\/php\//[email protected](^frontends/php/[^:]):.[email protected]\[email protected]' | uniq` | sed -nr '/:0$/s/([^:]):.$/\1/p'
      frontends/php/hostprofiles.php
      frontends/php/templates.php
      frontends/php/history.php
      frontends/php/actionconf.php
      frontends/php/proxies.php
      frontends/php/items.php
      frontends/php/triggers.php
      frontends/php/applications.php
      frontends/php/media_types.php
      frontends/php/maintenance.php
      frontends/php/usergrps.php
      frontends/php/auditacts.php
      frontends/php/screenconf.php
      frontends/php/auditlogs.php
      frontends/php/hostgroups.php
      frontends/php/graphs.php
      frontends/php/sysmaps.php
      frontends/php/hosts.php

        Attachments

        1. 0001-frontends-php-usergrps.php-ZBX-2783-fixed-undefined-.patch
          0.8 kB
        2. 0002-frontends-php-media_types.php-ZBX-2783-fixed-undefin.patch
          0.8 kB
        3. 0003-frontends-php-auditlogs.php-ZBX-2783-fixed-undefined.patch
          0.7 kB
        4. 0004-frontends-php-hostgroups.php-ZBX-2783-fixed-undefine.patch
          0.8 kB
        5. 0005-frontends-php-templates.php-ZBX-2783-fixed-undefined.patch
          1 kB
        6. 0006-frontends-php-hosts.php-ZBX-2783-fixed-undefined-var.patch
          0.8 kB
        7. 0007-frontends-php-maintenance.php-ZBX-2783-fixed-undefin.patch
          0.8 kB
        8. 0008-frontends-php-actionconf.php-ZBX-2783-fixed-undefine.patch
          0.9 kB
        9. 0009-frontends-php-screenconf.php-ZBX-2783-fixed-undefine.patch
          1.0 kB
        10. 0010-frontends-php-sysmaps.php-ZBX-2783-fixed-undefined-v.patch
          0.8 kB
        11. 0011-frontends-php-hostprofiles.php-ZBX-2783-fixed-undefi.patch
          0.8 kB
        12. 0012-frontends-php-history.php-ZBX-2783-fixed-undefined-v.patch
          0.9 kB
        13. 0013-frontends-php-proxies.php-ZBX-2783-fixed-undefined-v.patch
          0.7 kB
        14. 0014-frontends-php-items.php-ZBX-2783-fixed-undefined-var.patch
          0.9 kB
        15. 0015-frontends-php-triggers.php-ZBX-2783-fixed-undefined-.patch
          0.8 kB
        16. 0016-frontends-php-applications.php-ZBX-2783-fixed-undefi.patch
          1.0 kB
        17. 0017-frontends-php-auditacts.php-ZBX-2783-fixed-undefined.patch
          0.8 kB
        18. 0018-frontends-php-graphs.php-ZBX-2783-fixed-undefined-va.patch
          0.9 kB
        19. 0019-ZBX-2783-fixed-undefined-variable-config-.-in-many-f.patch
          0.8 kB

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            solo Aleksey Avdeev
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: