Skip to content

Commit

Permalink
other bugs for php8
Browse files Browse the repository at this point in the history
  • Loading branch information
berlin2123 authored Feb 21, 2024
1 parent 3790ca7 commit 6c7513f
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 7 deletions.
6 changes: 3 additions & 3 deletions cluster_view.php
Original file line number Diff line number Diff line change
Expand Up @@ -594,7 +594,7 @@ function get_load_heatmap($hosts_up, $host_regex, $metrics, $load_scale, $tpl_da
if (array_key_exists($user_metricname, $metrics))
$units = $metrics[$user_metricname]['UNITS'];
} else {
if (array_key_exists($user_metricname, $metrics[key($metrics)]))
if ((!is_null($metrics[key($metrics)])) && array_key_exists($user_metricname, $metrics[key($metrics)]))
if (isset($metrics[key($metrics)][$user_metricname]['UNITS']))
$units = $metrics[key($metrics)][$user_metricname]['UNITS'];
else
Expand All @@ -614,7 +614,7 @@ function get_load_heatmap($hosts_up, $host_regex, $metrics, $load_scale, $tpl_da
$user['ce'],
$conf['zoom_support'],
$conf['default_optional_graph_size'],
$cluster[LOCALTIME],
$cluster['LOCALTIME'],
$tpl_data);

//////////////////////////////////////////////////////////////////////////////
Expand Down Expand Up @@ -761,7 +761,7 @@ function get_load_heatmap($hosts_up, $host_regex, $metrics, $load_scale, $tpl_da
show_stacked_graphs($user['clustername'],
$user['metricname'],
$user['range'],
$cluster[LOCALTIME],
$cluster['LOCALTIME'],
$user['host_regex'],
$user['cs'],
$user['ce'],
Expand Down
2 changes: 1 addition & 1 deletion dwoo/Dwoo/Compiler.php
Original file line number Diff line number Diff line change
Expand Up @@ -1820,7 +1820,7 @@ protected function parseFunction($in, $from, $to, $parsingParams = false, $curBl
if ($func === 'tif') {
$params[] = $tokens;
}
$output = call_user_func_array($funcCompiler, $params);
$output = call_user_func_array($funcCompiler, array_values($params));
} else {
array_unshift($params, '$this');
$params = self::implode_r($params);
Expand Down
6 changes: 5 additions & 1 deletion meta_view.php
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,11 @@
# above the image. Not easy with template blocks.
$cols=5;
$i = 0;
$count=count($names);
if (is_null($names)) {
$count=0;
} else {
$count=count($names);
}
while ($i < $count)
{
$snapnames = "";
Expand Down
4 changes: 2 additions & 2 deletions stacked.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@
$command .= "TZ='" . sanitize($_SESSION['tz']) . "' ";

$command .= $conf['rrdtool'] . " graph - $rrd_options -E";
$command .= " --start '" . sanitize(${start}) . "'";
$command .= " --end '" . sanitize(${end}) . "'";
$command .= " --start '" . sanitize($start) . "'";
$command .= " --end '" . sanitize($end) . "'";
$command .= " --width 700";
$command .= " --height 300";

Expand Down

0 comments on commit 6c7513f

Please sign in to comment.