diff options
-rw-r--r-- | ChangeLog.d/bugfix/ZBX-19424 | 1 | ||||
-rw-r--r-- | ui/include/classes/api/services/CTriggerGeneral.php | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/ChangeLog.d/bugfix/ZBX-19424 b/ChangeLog.d/bugfix/ZBX-19424 new file mode 100644 index 00000000000..0475dfd5388 --- /dev/null +++ b/ChangeLog.d/bugfix/ZBX-19424 @@ -0,0 +1 @@ +A......... [ZBX-19424] fixed trigger handling failing if host name looks like a number (jfreibergs) diff --git a/ui/include/classes/api/services/CTriggerGeneral.php b/ui/include/classes/api/services/CTriggerGeneral.php index 9fd61501b6e..07788d7e15c 100644 --- a/ui/include/classes/api/services/CTriggerGeneral.php +++ b/ui/include/classes/api/services/CTriggerGeneral.php @@ -564,7 +564,7 @@ abstract class CTriggerGeneral extends CApiService { $db_hosts = DBselect( 'SELECT h.hostid,h.host,h.status'. ' FROM hosts h'. - ' WHERE '.dbConditionInt('h.host', array_keys($hosts)). + ' WHERE '.dbConditionString('h.host', array_keys($hosts)). ' AND '.dbConditionInt('h.status', [HOST_STATUS_MONITORED, HOST_STATUS_NOT_MONITORED, HOST_STATUS_TEMPLATE] ) |