mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-24 11:08:45 +02:00
N°5302 - PHP 8.1: Migrate some strlen() usages to internal method
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user