Private GIT

Skip to content
Snippets Groups Projects
Commit 7473fbe0 authored by Toufik MECHOUET's avatar Toufik MECHOUET
Browse files

Fix issue #3824 PHP Warning: array_map(): Argument #2 should be an array

parent 028f3e32
Branches
Tags
No related merge requests found
...@@ -559,11 +559,13 @@ class CentreonHost { ...@@ -559,11 +559,13 @@ class CentreonHost {
$i++; $i++;
} }
} else { } else {
if (isset($_REQUEST['tpSelect'])) {
foreach ($_REQUEST['tpSelect'] as $val) { foreach ($_REQUEST['tpSelect'] as $val) {
$arr[$i]['tpSelect_#index#'] = $val; $arr[$i]['tpSelect_#index#'] = $val;
$i++; $i++;
} }
} }
}
return $arr; return $arr;
} }
......
...@@ -46,7 +46,7 @@ ...@@ -46,7 +46,7 @@
# #
$host = array(); $host = array();
if (($o == "c" || $o == "w") && $host_id) { 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 # Set base value
if ($DBRESULT->numRows()) { if ($DBRESULT->numRows()) {
......
...@@ -135,7 +135,7 @@ ...@@ -135,7 +135,7 @@
$initialValues = array(); $initialValues = array();
if (($o == "c" || $o == "w") && $service_id) { if (($o == "c" || $o == "w") && $service_id) {
$DBRESULT = $pearDB->query("SELECT * FROM service, extended_service_information esi WHERE service_id = '".$service_id."' AND esi.service_service_id = service_id LIMIT 1"); $DBRESULT = $pearDB->query("SELECT * FROM service LEFT JOIN extended_service_information esi ON esi.service_service_id = service_id WHERE service_id = '".$service_id."' LIMIT 1");
/* /*
* Set base value * Set base value
*/ */
......
...@@ -57,7 +57,7 @@ if (($o == "c" || $o == "w") && $service_id) { ...@@ -57,7 +57,7 @@ if (($o == "c" || $o == "w") && $service_id) {
if (isset($lockedElements[$service_id])) { if (isset($lockedElements[$service_id])) {
$o = "w"; $o = "w";
} }
$DBRESULT = $pearDB->query("SELECT * FROM service, extended_service_information esi WHERE service_id = '".$service_id."' AND esi.service_service_id = service_id LIMIT 1"); $DBRESULT = $pearDB->query("SELECT * FROM service LEFT JOIN extended_service_information esi ON esi.service_service_id = service_id WHERE service_id = '".$service_id."' LIMIT 1");
// Set base value // Set base value
$service_list = $DBRESULT->fetchRow(); $service_list = $DBRESULT->fetchRow();
$service = array_map("myDecodeSvTP", $service_list); $service = array_map("myDecodeSvTP", $service_list);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment