Skip to content

Commit

Permalink
Fixes for issue #80 livestatus.php connector compatibility with PHP 8.2
Browse files Browse the repository at this point in the history
  • Loading branch information
chriscareycode committed Mar 16, 2024
1 parent c2534bd commit bb4106f
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions public/connectors/livestatus.php
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ function translateServiceAlertState($state) {
$query_arr[] = "Or: 2";
$query_arr[] = "OutputFormat: json";
$query_arr[] = "ResponseHeader: fixed16";
$query = join($query_arr, "\n");
$query = implode("\n", $query_arr);


$json = queryLivestatus($query);
Expand Down Expand Up @@ -311,7 +311,7 @@ function translateServiceAlertState($state) {
$query_arr[] = "Or: 3";
$query_arr[] = "OutputFormat: json";
$query_arr[] = "ResponseHeader: fixed16";
$query = join($query_arr, "\n");
$query = implode("\n", $query_arr);

$json = queryLivestatus($query);

Expand Down Expand Up @@ -398,7 +398,7 @@ function translateServiceAlertState($state) {
$query_arr[] = "Filter: time >= " . $alert_starttime;
$query_arr[] = "OutputFormat: json";
$query_arr[] = "ResponseHeader: fixed16";
$query = join($query_arr, "\n");
$query = implode("\n", $query_arr);

$json = queryLivestatus($query);

Expand Down Expand Up @@ -480,7 +480,7 @@ function translateServiceAlertState($state) {
$query_arr[] = "GET comments";
$query_arr[] = "OutputFormat: json";
$query_arr[] = "ResponseHeader: fixed16";
$query = join($query_arr, "\n");
$query = implode("\n", $query_arr);

$json = queryLivestatus($query);

Expand Down Expand Up @@ -537,7 +537,7 @@ function translateServiceAlertState($state) {
$query_arr[] = "GET hostgroups";
$query_arr[] = "OutputFormat: json";
$query_arr[] = "ResponseHeader: fixed16";
$query = join($query_arr, "\n");
$query = implode("\n", $query_arr);

$json = queryLivestatus($query);

Expand Down Expand Up @@ -591,7 +591,7 @@ function translateServiceAlertState($state) {
$query_arr[] = "GET servicegroups";
$query_arr[] = "OutputFormat: json";
$query_arr[] = "ResponseHeader: fixed16";
$query = join($query_arr, "\n");
$query = implode("\n", $query_arr);

$json = queryLivestatus($query);

Expand Down Expand Up @@ -646,7 +646,7 @@ function translateServiceAlertState($state) {
$query_arr[] = "Columns: state";
$query_arr[] = "OutputFormat: json";
$query_arr[] = "ResponseHeader: fixed16";
$query = join($query_arr, "\n");
$query = implode("\n", $query_arr);

$json = queryLivestatus($query);

Expand Down Expand Up @@ -687,7 +687,7 @@ function translateServiceAlertState($state) {
$query_arr[] = "Columns: state";
$query_arr[] = "OutputFormat: json";
$query_arr[] = "ResponseHeader: fixed16";
$query = join($query_arr, "\n");
$query = implode("\n", $query_arr);

$json = queryLivestatus($query);

Expand Down Expand Up @@ -727,7 +727,7 @@ function translateServiceAlertState($state) {
$query_arr[] = "GET status";
$query_arr[] = "OutputFormat: json";
$query_arr[] = "ResponseHeader: fixed16";
$query = join($query_arr, "\n");
$query = implode("\n", $query_arr);

$json = queryLivestatus($query);

Expand Down

0 comments on commit bb4106f

Please sign in to comment.