Invalid API color picker value causes widget error

XMLWordPrintable

    • Type: Problem report
    • Resolution: Won't fix
    • Priority: Trivial
    • None
    • Affects Version/s: 7.0.13rc1, 7.2.7rc1, 7.4.0beta2
    • Component/s: API (A)

      Steps to reproduce:

      1. Create dashboard with graph widget via API
      2. Type invalid color picker value for widget
         {
                 "type": "1",
                 "name": "ds.0.color",
                  "value": "97"
         }
        
      3. Check created widget

      Result:
      PHP runtime error

      Trying to access array offset on false [zabbix.php:17 -> require_once() -> ZBase->run() -> ZBase->processRequest() -> CController->run() -> Widgets\SvgGraph\Actions\WidgetView->doAction() -> Widgets\SvgGraph\Includes\CSvgGraphHelper::get() -> Widgets\SvgGraph\Includes\CSvgGraphHelper::getMetricsPattern() -> getColorVariations() -> CConfigFile->{closure:/.../../.../7.0/ui/conf/zabbix.conf.php:83}() in include/func.inc.php:328]

            Assignee:
            Zabbix Support Team
            Reporter:
            Natalja Romancaka
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - Not Specified
                Not Specified
                Logged:
                Time Spent - 3h
                3h