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

Undefined index when locale init on API login

XMLWordPrintable

    • Sprint 48, Jan 2019, Sprint 49 (Feb 2019), Sprint 50 (Mar 2019), Sprint 51 (Apr 2019), Sprint 52 (May 2019)
    • 1

      Steps to reproduce:

      • send API login call through JSON RPC in windows environment
        {
            "jsonrpc": "2.0",
            "method": "user.login",
            "params": {
                "user": "Admin",
                "password": "zabbix"
            },
            "id": 1,
            "auth": null
        }
        

      Result:
      See PHPUNIT_ERROR_LOG:

      Undefined index:  [api_jsonrpc.php:55 -> ZBase->run() -> ZBase->initLocales() -> zbx_locale_variants() -> zbx_locale_variants_win() -> CConfigFile->{closure}() in include\locales.inc.php:185]
      Invalid argument supplied for foreach() [api_jsonrpc.php:55 -> ZBase->run() -> ZBase->initLocales() -> CConfigFile->{closure}() in include\classes\core\ZBase.php:315]
      implode(): Invalid arguments passed [api_jsonrpc.php:55 -> ZBase->run() -> ZBase->initLocales() -> implode() -> CConfigFile->{closure}() in include\classes\core\ZBase.php:337]
      

      Expected:
      Code must be executed without PHP errors. API calls should not touch the CWebUser class.

            Miks.Kronkalns Miks Kronkalns
            basilgon Vasily Goncharenko (Inactive)
            Team B
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: