#12460 fixed log deprecated

This commit is contained in:
Daniel Cebrian 2023-12-11 09:18:40 +01:00
parent 5351af2f7a
commit 7f4dc4fbe4
4 changed files with 10 additions and 4 deletions

View File

@ -541,7 +541,7 @@ function api_get_groups($thrash1, $thrash2, $other, $returnType, $user_in_db)
}
function api_get_agent_module_name_last_value($agentName, $moduleName, $other=';', $returnType)
function api_get_agent_module_name_last_value($agentName, $moduleName, $other=';', $returnType='')
{
$idAgent = agents_get_agent_id($agentName);
@ -558,7 +558,7 @@ function api_get_agent_module_name_last_value($agentName, $moduleName, $other=';
}
function api_get_agent_module_name_last_value_alias($alias, $moduleName, $other=';', $returnType)
function api_get_agent_module_name_last_value_alias($alias, $moduleName, $other=';', $returnType='')
{
$sql = sprintf(
'SELECT tagente_modulo.id_agente_modulo FROM tagente_modulo
@ -573,7 +573,7 @@ function api_get_agent_module_name_last_value_alias($alias, $moduleName, $other=
}
function api_get_module_last_value($idAgentModule, $trash1, $other=';', $returnType)
function api_get_module_last_value($idAgentModule, $trash1, $other=';', $returnType='')
{
global $config;
if (defined('METACONSOLE')) {

View File

@ -147,6 +147,10 @@ function ui_print_truncate_text(
$text_html_decoded = io_safe_output($text);
$text_has_entities = $text != $text_html_decoded;
if ($text_html_decoded === null) {
$text_html_decoded = '';
}
if (mb_strlen($text_html_decoded, 'UTF-8') > ($numChars)) {
// '/2' because [...] is in the middle of the word.
$half_length = intval(($numChars - 3) / 2);

View File

@ -117,6 +117,8 @@ class NewsBoard extends Element
$output .= '</div>';
return $output;
} else {
return '';
}
}

View File

@ -505,7 +505,7 @@ if (is_ajax() === true) {
}
}
if (strlen($tmp->server_name) >= 10) {
if (strlen(($tmp->server_name ?? '')) >= 10) {
$tmp->server_name = ui_print_truncate_text(
$tmp->server_name,
10,