
Rangelweb
(usa Linux Mint)
Enviado em 30/05/2020 - 08:23h
Bom dia!
Estou trabalhando com Joomla e um módulo que deu esse problema por causa da versão do PHP
Até a versão 7.0 funcionava, agora não mais.
Eu não entendo de PHP, se alguém puder me ajudar.
Mensagem de erro;
Warning; non-numeric value encountered in
// calculate the length of the plain text part of the line; handle entities as one character
$content_length = JString::strlen(preg_replace('/&[0-9a-z]{2,8};|&#[0-9]{1,7};|[0-9a-f]{1,6};/i', ' ', $line_matchings[2]));
if ($total_length + $content_length > $length) {
// the number of characters which are left
$left = $length - $total_length;
$entities_length = 0;
// search for html entities
if (preg_match_all('/&[0-9a-z]{2,8};|&#[0-9]{1,7};|[0-9a-f]{1,6};/i', $line_matchings[2], $entities, PREG_OFFSET_CAPTURE)) {
// calculate the real length of all entities in the legal range
foreach ($entities[0] as $entity) {
if ($entity[1] + 1 - $entities_length <= $left) {
$left--;
$entities_length += JString::strlen($entity[0]);
} else {
// no more characters left
break;
}
}
}