[ZBX-11930] [Patch] Undefined index: lastEvent [zabbix.php:21 Created: 2017 Mar 16  Updated: 2018 Jan 29  Resolved: 2017 Mar 20

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Frontend (F)
Affects Version/s: 3.2.4
Fix Version/s: None

Type: Incident report Priority: Trivial
Reporter: Andrew Martin Assignee: Unassigned
Resolution: Duplicate Votes: 0
Labels: frontend, patch, trivial
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: File fix.patch    
Issue Links:
Duplicate
is duplicated by ZBX-11877 Undefined index in screens Closed

 Description   

The dashboard in the WebUI displays this error message:
Undefined index: lastEvent [zabbix.php:21 ? require_once() ? ZBase->run() ? ZBase->processRequest() ? CView->getOutput() ? include() ? make_latest_issues() ? make_popup_eventlist() in include/events.inc.php:441]

This simple patch fixes the error:

--- /tmp/events.inc.php 2017-03-16 08:30:19.284449638 -0500
+++ /usr/share/zabbix/include/events.inc.php    2017-03-16 08:24:10.538594536 -0500
@@ -438,7 +438,7 @@
                $table->setHeader([_('Time'), _('Status'), _('Duration'), _('Age')]);
        }
 
-       if ($trigger['lastEvent']) {
+       if (isset($trigger['lastEvent']) && $trigger['lastEvent']) {
                $events = API::Event()->get([
                        'source' => EVENT_SOURCE_TRIGGERS,
                        'object' => EVENT_OBJECT_TRIGGER,


 Comments   
Comment by Oleg Egorov (Inactive) [ 2017 Mar 20 ]

Thank you, but issue was fixed in ZBX-11877
CLOSED

Comment by Stanislav [ 2017 Mar 21 ]

Thank you! It is a solution!! Works))

Comment by doldon doldon doldon [ 2017 Nov 16 ]

Excuse me
How to add a patch?

Comment by Rostislav Palivoda [ 2017 Nov 16 ]

JIRA documentation - https://confluence.atlassian.com/jira064/attaching-a-file-720416227.html
All logged in users should be able to upload .patch files. Maybe you are not logged in?

Comment by doldon doldon doldon [ 2017 Nov 16 ]

Mean
How to fix.patch in zabbix

Comment by Rostislav Palivoda [ 2017 Nov 16 ]

http://www.markusbe.com/2009/12/how-to-read-a-patch-or-diff-and-understand-its-structure-to-apply-it-manually/

Comment by doldon doldon doldon [ 2017 Nov 16 ]

Thanks for the answer

Comment by Ben Mead [ 2018 Jan 29 ]

Thank you! This solution worked great for me.

Generated at Fri Apr 11 08:52:37 EEST 2025 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.