#12460 fixed deprecated

This commit is contained in:
Daniel Cebrian 2024-01-24 13:28:43 +01:00
parent fbb5d349a2
commit fd8d233cf8
7 changed files with 22 additions and 8 deletions

View File

@ -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'
);

View File

@ -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)) {

View File

@ -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'),

View File

@ -54,6 +54,13 @@ class Diagnostics extends Wizard
*/
public $pdf;
/**
* Product name.
*
* @var string
*/
public $product_name;
/**
* Constructor.

View File

@ -706,7 +706,7 @@ class NetworkMap
*/
public function setNodes($nodes)
{
$this->nodes = $nodes;
$this->nodes = (array) $nodes;
}

View File

@ -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;
}

View File

@ -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',