N°5302 - PHP 8.1: Migrate some strlen() usages to internal method

This commit is contained in:
Molkobain
2023-01-16 16:47:26 +01:00
parent b2c256e51e
commit da07fadfb3
5 changed files with 6 additions and 5 deletions

View File

@@ -21,6 +21,7 @@ namespace Combodo\iTop\Form\Field;
use Str;
use Closure;
use utils;
/**
* Description of UrlField
@@ -58,7 +59,7 @@ class UrlField extends StringField
public function GetDisplayValue()
{
$sLabel = Str::pure2html($this->currentValue);
if (strlen($sLabel) > 128)
if (utils::StrLen($sLabel) > 128)
{
// Truncate the length to 128 characters, by removing the middle
$sLabel = substr($sLabel, 0, 100).'.....'.substr($sLabel, -20);