Skip to content

Commit

Permalink
PHP Fatal error: Uncaught TypeError: in_array(): Argument ganglia#2 (…
Browse files Browse the repository at this point in the history
…$haystack) must be of type array, null given in /usr/share/ganglia/get_ganglia.php:10
  • Loading branch information
berlin2123 authored Feb 26, 2024
1 parent de93326 commit 3efd5bf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion get_ganglia.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

# If we are in compare_hosts, views and decompose_graph context we shouldn't attempt
# any connections to the gmetad
if (! in_array($context, $SKIP_GMETAD_CONTEXTS) ) {
if (! ( isset($context) && is_array($context) && isset($SKIP_GMETAD_CONTEXTS) && is_array($SKIP_GMETAD_CONTEXTS) && in_array($context, $SKIP_GMETAD_CONTEXTS) ) ) {
if (! Gmetad($conf['ganglia_ip'], $conf['ganglia_port']) )
{
print "<H4>There was an error collecting ganglia data ".
Expand Down

0 comments on commit 3efd5bf

Please sign in to comment.