Steps to reproduce:
- Create host H1 with discovery rule with item prototype with key "x"
- Create other host H2 with item I2 with key "x"
- On dashboard create Simple graph widget with item I2.
- Mark widget as Dynamic. Save dashboard.
- Select H1 as source for dynamic widgets.
Undefined offset: 0 [zabbix.php:21 ? require_once() ? ZBase->run() ? ZBase->processRequest() ? CController->run() ? CControllerWidgetGraphView->doAction() in app\controllers\CControllerWidgetGraphView.php:151]
Message: "No permissions to referred object or it does not exist!"
This happens, because graph widget uses function get_same_item_for_host(), that searches for item prototypes, as well as items.