[ZBX-24913] tr_events.php Event View PHP Fatal error: Uncaught TypeError: count() Created: 2024 Jul 26 Updated: 2024 Jul 26 Resolved: 2024 Jul 26 |
|
Status: | Closed |
Project: | ZABBIX BUGS AND ISSUES |
Component/s: | Server (S) |
Affects Version/s: | 7.0.1 |
Fix Version/s: | None |
Type: | Problem report | Priority: | Trivial |
Reporter: | Yury Larin | Assignee: | Zabbix Development Team |
Resolution: | Duplicate | Votes: | 0 |
Labels: | None | ||
Remaining Estimate: | Not Specified | ||
Time Spent: | Not Specified | ||
Original Estimate: | Not Specified |
Issue Links: |
|
Description |
Steps to reproduce:
Result: PHP errors on web server log.
Looks like no event array from this line:
$events = API::Event()->get([
Logs:
2024/07/26 13:08:08 [error] 330910#330910: *84595 FastCGI sent in stderr: "PHP message: PHP Warning: foreach() argument must be of type array|object, bool given in /usr/share/zabbix/include/events.inc.php on line 360; PHP message: PHP Warning: foreach() argument must be of type array|object, bool given in /usr/share/zabbix/include/events.inc.php on line 376; PHP message: PHP Fatal error: Uncaught TypeError: getEventsActionsIconsData(): Argument #1 ($events) must be of type array, bool given, called in /usr/share/zabbix/include/events.inc.php on line 394 and defined in /usr/share/zabbix/include/actions.inc.php:1087 Stack trace: #0 /usr/share/zabbix/include/events.inc.php(394): getEventsActionsIconsData() #1 /usr/share/zabbix/tr_events.php(175): make_small_eventlist() #2 {main} thrown in /usr/share/zabbix/include/actions.inc.php on line 1087" while reading response header from upstream, client: 10.1.30.2, server: zabbix.in.urnet.com.au, request: "GET /tr_events.php?triggerid=559083&eventid=2981173819 HTTP/1.1", upstream: "fastcgi://unix:/var/run/php/zabbix.sock:", host: "zabbix.in.urnet.com.au", referrer: "https://zabbix.in.urnet.com.au/zabbix.php?show=1&name=&acknowledgement_status=0&inventory%5B0%5D%5Bfield%5D=type&inventory%5B0%5D%5Bvalue%5D=&evaltype=0&tags%5B0%5D%5Btag%5D=Customer&tags%5B0%5D%5Boperator%5D=3&tags%5B0%5D%5Bvalue%5D=APA&tags%5B1%5D%5Btag%5D=SAT&tags%5B1%5D%5Boperator%5D=5&tags%5B1%5D%5Bvalue%5D=&tags%5B2%5D%5Btag%5D=Customer&tags%5B2%5D%5Boperator%5D=3&tags%5B2%5D%5Bvalue%5D=Santos&tags%5B3%5D%5Btag%5D=Customer&tags%5B3%5D%5Boperator%5D=3&tags%5B3%5D%5Bvalue%5D=PIT&tags%5B4%5D%5Btag%5D=Customer&tags%5B4%5D%5Boperator%5D=3&tags%5B4%5D%5Bvalue%5D=Verbrec&tags%5B5%5D%5Btag%5D=Customer&tags%5B5%5D%5Boperator%5D=3&tags%5B5%5D%5Bvalue%5D=Centralian%20Controls&show_tags=3&tag_name_format=0&tag_priority=&show_opdata=1&show_timeline=1&filter_name=All.%20No%20APA.%20No%20SAT.&filter_show_counter=1&filter_custom_time=0&sort=clock&sortorder=DESC&age_state=0&show_symptoms=0&show_suppressed=0&acknowledg 2024/07/26 13:08:08 [error] 330910#330910: *84595 FastCGI sent in stderr: "; PHP message: PHP Warning: Undefined array key "file" in /usr/share/zabbix/include/classes/debug/CProfiler.php on line 374; PHP message: PHP Warning: Undefined array key "line" in /usr/share/zabbix/include/classes/debug/CProfiler.php on line 374; PHP message: PHP Warning: Cannot modify header information - headers already sent in /usr/share/zabbix/include/classes/helpers/CCookieHelper.php on line 54; PHP message: PHP Warning: PHP Request Shutdown: Failed to write session data using user defined save handler. (session.save_path: /var/lib/php/sessions/, handler: update_timestamp) in Unknown on line 0" while reading upstream, client: 10.1.30.2, server: zabbix.in.urnet.com.au, request: "GET /tr_events.php?triggerid=559083&eventid=2981173819 HTTP/1.1", upstream: "fastcgi://unix:/var/run/php/zabbix.sock:", host: "zabbix.in.urnet.com.au", referrer: "https://zabbix.in.urnet.com.au/zabbix.php?show=1&name=&acknowledgement_status=0&inventory%5B0%5D%5Bfield%5D=type&inventory%5B0%5D%5Bvalue%5D=&evaltype=0&tags%5B0%5D%5Btag%5D=Customer&tags%5B0%5D%5Boperator%5D=3&tags%5B0%5D%5Bvalue%5D=APA&tags%5B1%5D%5Btag%5D=SAT&tags%5B1%5D%5Boperator%5D=5&tags%5B1%5D%5Bvalue%5D=&tags%5B2%5D%5Btag%5D=Customer&tags%5B2%5D%5Boperator%5D=3&tags%5B2%5D%5Bvalue%5D=Santos&tags%5B3%5D%5Btag%5D=Customer&tags%5B3%5D%5Boperator%5D=3&tags%5B3%5D%5Bvalue%5D=PIT&tags%5B4%5D%5Btag%5D=Customer&tags%5B4%5D%5Boperator%5D=3&tags%5B4%5D%5Bvalue%5D=Verbrec&tags%5B5%5D%5Btag%5D=Customer&tags%5B5%5D%5Boperator%5D=3&tags%5B5%5D%5Bvalue%5D=Centralian%20Controls&show_tags=3&tag_name_format=0&tag_priority=&show_opdata=1&show_timeline=1&filter_name=All.%20No%20APA.%20No%20SAT.&filter_show_counter=1&filter_custom_time=0&sort=clock&sortorder=DESC&age_state=0&show_symptoms=0&show_suppressed=0&acknowledged_by_me=0&compact_view=0&details=0&highlight_row=0&action=problem.view"
|
Comments |
Comment by Alexander Vladishev [ 2024 Jul 26 ] |
Closed as duplicate of |
Comment by Yury Larin [ 2024 Jul 26 ] |
Hi Alexander, Are you sure that it is duplicate? Different file, different function, different problem... Here we have empty var instead of not array one. |