-
Problem report
-
Resolution: Fixed
-
Critical
-
4.0.28
-
None
-
Sprint 72 (Jan 2021), Sprint 73 (Feb 2021)
-
0.25
Running RHEL7 and Zabbix 4.0.27, system upgraded to 4.0.28 two days ago. Today I noticed no graphs were loading on any page - screen pages or individual graph pages. Only a broken icon showing. HTTP error log showed an error 500:
[Wed Jan 27 14:09:55.933697 2021] [:error] [pid 1417] [client X.X.X.X:38378] PHP Parse error: syntax error, unexpected ':', expecting ';' or '{' in /usr/share/zabbix/include/classes/graphdraw/CLineGraphDraw.php on line 1305, referer: https://X.X.X.X/host_screen.php?hostid=10496&screenid=4
After looking at the code it seemed like the ": array" part was unliked by php, and removing that allows the graphs to redraw. I don't know enough php to know if that's the right way to fix it, but I can see graphs again
--- tmp.php 2021-01-27 14:13:18.497561117 -0500 +++ /usr/share/zabbix/include/classes/graphdraw/CLineGraphDraw.php 2021-01-27 14:12:52.692597306 -0500 @@ -1302,7 +1302,7 @@ * * @return array */ - private function getOptimalDateTimeIntervalSpec(int $pref_sub_interval, float $min_sub_interval): array { + private function getOptimalDateTimeIntervalSpec(int $pref_sub_interval, float $min_sub_interval) { // Possible X-axis main and sub-intervals. $intervals = [ 'PT1M' => ['PT1S', 'PT5S', 'PT10S', 'PT30S'], @@ -1382,7 +1382,7 @@ * * @return array */ - private function getDateTimeIntervals(int $start, int $end, DateInterval $interval): array { + private function getDateTimeIntervals(int $start, int $end, DateInterval $interval) { $intervals = []; $interval_ts = (new DateTime('@0'))
- caused by
-
ZBX-18556 Graphs for repeated hour during winter time change missing date labels
- Closed
- duplicates
-
ZBX-18972 Graphs have'nt working after upgrade to 4.0.28
- Closed
-
ZBX-19028 zabbix-web-4.0.28-1.el7.noarch broke CLineGraphDraw.php on CentOS 7 | php 5.4.16
- Closed
- is duplicated by
-
ZBX-18962 Graphs do not load with CentOS 7 PHP 5.4.16
- Closed