[ZBX-24633] Uncaught TypeError: array_key_exists(): Argument #2 ($array) must be of type array, null given in /usr/share/zabbix/graphs.php:722 Created: 2024 Jun 08 Updated: 2024 Oct 29 Resolved: 2024 Oct 29 |
|
Status: | Closed |
Project: | ZABBIX BUGS AND ISSUES |
Component/s: | Frontend (F) |
Affects Version/s: | 6.4.15 |
Fix Version/s: | 6.0.36rc1, 7.0.6rc1, 7.2.0beta1 |
Type: | Problem report | Priority: | Minor |
Reporter: | Matthew Enger | Assignee: | Janis Freibergs |
Resolution: | Fixed | Votes: | 0 |
Labels: | None | ||
Remaining Estimate: | Not Specified | ||
Time Spent: | 74h | ||
Original Estimate: | Not Specified |
Issue Links: |
|
||||||||||||
Team: | |||||||||||||
Sprint: | Prev.Sprint, S24-W28/29, S24-W30/31, S24-W32/33, S24-W34/35, S24-W38/39, S24-W40/41, S24-W42/43 | ||||||||||||
Story Points: | 1 |
Description |
When clicking through the host graphs /graphs.php?context=host&page=4 it goes to a blank page. Looking at the php logs we get: [Sat Jun 08 11:14:13.711280 2024] [php:warn] [pid 1305477] [client 103.51.114.32:53578] PHP Warning: Undefined array key 9346 in /usr/share/zabbix/graphs.php on line 722, referer: http://removed.com.au/zabbix/graphs.php?context=host&page=3 [Sat Jun 08 11:14:13.711381 2024] [php:warn] [pid 1305477] [client 103.51.114.32:53578] PHP Warning: Trying to access array offset on value of type null in /usr/share/zabbix/graphs.php on line 722, referer: http://removed.com.au/zabbix/graphs.php?context=host&page=3 [Sat Jun 08 11:14:13.711422 2024] [php:error] [pid 1305477] [client 103.51.114.32:53578] PHP Fatal error: Uncaught TypeError: array_key_exists(): Argument #2 ($array) must be of type array, null given in /usr/share/zabbix/graphs.php:722\nStack trace:\n#0 {main}\n thrown in /usr/share/zabbix/graphs.php on line 722, referer: http://removed.com.au/zabbix/graphs.php?context=host&page=3 I believe this is due to graphs referring to objects which have been removed as this zabbix instance has been upgraded multiple times. |
Comments |
Comment by Matthew Enger [ 2024 Aug 14 ] |
I am unsure where this is up to, but this patch I came up with fixed the issue for me: — graphs.php 2024-08-14 14:53:31.374152951 +1000 foreach (array_column($item['graphs'], 'graphid') as $graphid) {
|
Comment by Janis Freibergs [ 2024 Oct 25 ] |
Available in versions:
|