diff --git a/pandora_console/godmode/agentes/module_manager_editor.php b/pandora_console/godmode/agentes/module_manager_editor.php index 130f31c79d..543d241fc9 100644 --- a/pandora_console/godmode/agentes/module_manager_editor.php +++ b/pandora_console/godmode/agentes/module_manager_editor.php @@ -150,7 +150,7 @@ if (is_ajax()) { $component = db_get_row('tlocal_component', 'id', $id_component); foreach ($component as $index => $element) { $component[$index] = html_entity_decode( - $element, + (isset($element) === true) ? $element : '', ENT_QUOTES, 'UTF-8' ); diff --git a/pandora_console/godmode/agentes/module_manager_editor_plugin.php b/pandora_console/godmode/agentes/module_manager_editor_plugin.php index 9b5d98c27d..abbbc4d9c1 100644 --- a/pandora_console/godmode/agentes/module_manager_editor_plugin.php +++ b/pandora_console/godmode/agentes/module_manager_editor_plugin.php @@ -60,7 +60,12 @@ $data[1] = html_print_select_from_sql( $disabledBecauseInPolicy ); // Store the macros in base64 into a hidden control to move between pages -$data[1] .= html_print_input_hidden('macros', base64_encode($macros), true); +$data[1] .= html_print_input_hidden( + 'macros', + (isset($macros) === true) ? base64_encode($macros) : '', + true +); + $table_simple->colspan['plugin_1'][2] = 2; if (!empty($id_plugin)) { diff --git a/pandora_console/godmode/wizards/HostDevices.class.php b/pandora_console/godmode/wizards/HostDevices.class.php index 4f0043f038..08a47b12f8 100755 --- a/pandora_console/godmode/wizards/HostDevices.class.php +++ b/pandora_console/godmode/wizards/HostDevices.class.php @@ -1109,7 +1109,7 @@ class HostDevices extends Wizard 'return' => true, 'selected' => explode( ',', - $this->task['id_network_profile'] + (isset($this->task['id_network_profile']) === true) ? $this->task['id_network_profile'] : '' ), 'nothing_value' => 0, 'nothing' => __('None'), diff --git a/pandora_console/include/class/Diagnostics.class.php b/pandora_console/include/class/Diagnostics.class.php index 9d4a3b2901..898d9f5af9 100644 --- a/pandora_console/include/class/Diagnostics.class.php +++ b/pandora_console/include/class/Diagnostics.class.php @@ -54,6 +54,13 @@ class Diagnostics extends Wizard */ public $pdf; + /** + * Product name. + * + * @var string + */ + public $product_name; + /** * Constructor. diff --git a/pandora_console/include/class/NetworkMap.class.php b/pandora_console/include/class/NetworkMap.class.php index 184e830e9c..3a8b947926 100644 --- a/pandora_console/include/class/NetworkMap.class.php +++ b/pandora_console/include/class/NetworkMap.class.php @@ -706,7 +706,7 @@ class NetworkMap */ public function setNodes($nodes) { - $this->nodes = $nodes; + $this->nodes = (array) $nodes; } diff --git a/pandora_console/include/functions.php b/pandora_console/include/functions.php index 7c1638f8fa..421d3e7725 100644 --- a/pandora_console/include/functions.php +++ b/pandora_console/include/functions.php @@ -2925,6 +2925,10 @@ function delete_dir($dir) */ function is_image_data($data) { + if (isset($data) === false) { + return false; + } + return (substr($data, 0, 10) == 'data:image'); } @@ -2947,7 +2951,7 @@ function is_snapshot_data($data) */ function is_text_to_black_string($data) { - if (is_image_data($data)) { + if (isset($data) === false || is_image_data($data)) { return false; } diff --git a/pandora_console/include/functions_io.php b/pandora_console/include/functions_io.php index 445504b11c..dd8dd1f6dc 100755 --- a/pandora_console/include/functions_io.php +++ b/pandora_console/include/functions_io.php @@ -561,10 +561,8 @@ function io_output_password($password, $wrappedBy='') ] ); - $output = ($plaintext === ENTERPRISE_NOT_HOOK) ? $password : $plaintext; - // If password already decrypt return same password. - $output = (empty($plaintext) === true) ? $password : $plaintext; + $output = (empty($plaintext) === true || $plaintext === ENTERPRISE_NOT_HOOK) ? $password : $plaintext; return sprintf( '%s%s%s',