Skip to content
This repository has been archived by the owner on Dec 13, 2022. It is now read-only.

Commit

Permalink
Fix issue #3824 PHP Warning: array_map(): Argument #2 should be an array
Browse files Browse the repository at this point in the history
  • Loading branch information
Toufik MECHOUET committed Oct 27, 2015
1 parent 04d6db4 commit 0dd738d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion www/class/centreonGraph.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -970,7 +970,7 @@ private function _getServiceGraphID()

$tab = array();
while (1) {
$DBRESULT = $this->DB->query("SELECT esi.graph_id, service_template_model_stm_id FROM service, extended_service_information esi WHERE service_id = '".$service_id."' AND esi.service_service_id = service_id LIMIT 1");
$DBRESULT = $this->DB->query("SELECT esi.graph_id, service_template_model_stm_id FROM service LEFT JOIN extended_service_information esi ON esi.service_service_id = service_id WHERE service_id = '".$service_id."' LIMIT 1");
$row = $DBRESULT->fetchRow();
if ($row["graph_id"]) {
$this->graphID = $row["graph_id"];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@

$svc_method = new CentreonService($pearDB);

$DBRESULT = $pearDB->query("SELECT service_id, service_description, esi_notes, esi_notes_url, esi_action_url, esi_icon_image, esi_icon_image_alt FROM service, extended_service_information WHERE service_service_id = service_id AND service_register = '1' AND service_activate = '1'");
$DBRESULT = $pearDB->query("SELECT service_id, service_description, esi_notes, esi_notes_url, esi_action_url, esi_icon_image, esi_icon_image_alt FROM service LEFT JOIN extended_service_information ON service_service_id = service_id WHERE service_register = '1' AND service_activate = '1'");
while ($esi = $DBRESULT->fetchRow()) {
if (isset($esi["service_id"]) && ($esi["esi_notes"] || $esi["esi_notes_url"] || $esi["esi_action_url"] || $esi["esi_icon_image"] || $esi["esi_icon_image_alt"])) {
$hosts = getMyServiceHosts($esi["service_id"]);
Expand Down
4 changes: 2 additions & 2 deletions www/include/configuration/configObject/host/formHost.php
Original file line number Diff line number Diff line change
Expand Up @@ -125,13 +125,13 @@ function allInSameInstance($hosts, $instanceId) {
}
return true;
}

/*
* Database retrieve information for Host
*/
$host = array();
if (($o == "c" || $o == "w") && $host_id) {
$DBRESULT = $pearDB->query("SELECT * FROM host, extended_host_information ehi WHERE host_id = '".$host_id."' AND ehi.host_host_id = host.host_id LIMIT 1");
$DBRESULT = $pearDB->query("SELECT * FROM host LEFT JOIN extended_host_information ehi ON ehi.host_host_id = host.host_id WHERE host_id = '".$host_id."' LIMIT 1");

/*
* Set base value
Expand Down

0 comments on commit 0dd738d

Please sign in to comment.