-
Type:
Problem report
-
Resolution: Unresolved
-
Priority:
Trivial
-
Affects Version/s: 7.0.24rc1, 7.4.8rc1, 8.0.0alpha2
-
Component/s: Frontend (F)
-
S26-W10/11
-
1
Steps to reproduce:
- Add Item history widget, in columns section select item that does not have data yet, for example, Available memory (Numeric (unsigned))
- Add Item value widget and for Item Select->widget Item history
- Add Gauge widget and for Item Select->widget Item history
- Starting from 7.4, add Item card widget and for Item Select->widget Item history
Result:
PHP runtime error appear for Item value and Gauge widgets:
Error is displayed for Item card widget, even, if item with numeric type of information is selected for Item history :
Invalid parameter "Item/1": a number is expected.
Expected:
Item value, Gauge and Item card widgets should display status Awaiting data instead of errrors:
![]()
Error message:
array_flip(): Can only flip string and integer values, entry skipped [zabbix.php:17 → require_once() → ZBase->run() → ZBase->processRequest() → CController->run() → CControllerDashboardWidgetView->checkInput() → Zabbix\Core\CWidget->getForm() → Widgets\Item\Includes\WidgetForm->__construct() → CApiWrapper->__call() → CFrontendApiWrapper->callMethod() → CApiWrapper->callMethod() → CFrontendApiWrapper->callClientMethod() → CLocalApiClient->callMethod() → CItem->get() → dbConditionInt() → array_flip() → CConfigFile->{closure}() in conf/zabbix.conf.php:89]
pg_query(): Query failed: ERROR: syntax error at or near ")"
LINE 1: ...units FROM items i WHERE i.flags IN (0,4) AND i.itemid IN ()
^ [zabbix.php:17 → require_once() → ZBase->run() → ZBase->processRequest() → CController->run() → CControllerDashboardWidgetView->checkInput() → Zabbix\Core\CWidget->getForm() → Widgets\Item\Includes\WidgetForm->__construct() → CApiWrapper->__call() → CFrontendApiWrapper->callMethod() → CApiWrapper->callMethod() → CFrontendApiWrapper->callClientMethod() → CLocalApiClient->callMethod() → CItem->get() → DBselect() → pg_query() → CConfigFile->{closure}() in conf/zabbix.conf.php:89]
Error in query [SELECT i.itemid,i.units FROM items i WHERE i.flags IN (0,4) AND i.itemid IN ()] [ERROR: syntax error at or near ")"
LINE 1: ...units FROM items i WHERE i.flags IN (0,4) AND i.itemid IN ()
^] [zabbix.php:17 → require_once() → ZBase->run() → ZBase->processRequest() → CController->run() → CControllerDashboardWidgetView->checkInput() → Zabbix\Core\CWidget->getForm() → Widgets\Item\Includes\WidgetForm->__construct() → CApiWrapper->__call() → CFrontendApiWrapper->callMethod() → CApiWrapper->callMethod() → CFrontendApiWrapper->callClientMethod() → CLocalApiClient->callMethod() → CItem->get() → DBselect() → trigger_error() → CConfigFile->{closure}() in conf/zabbix.conf.php:89]
Invalid parameter "Item/1": a number is expected.