mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-20 17:18:51 +02:00
Merge remote-tracking branch 'origin/support/3.0' into develop
This commit is contained in:
@@ -2809,6 +2809,23 @@ HTML;
|
||||
return $aPrefs[$sShortcutId];
|
||||
}
|
||||
|
||||
//----------------------------------------------
|
||||
// PHP function helpers
|
||||
//----------------------------------------------
|
||||
|
||||
/**
|
||||
* Helper around the native strlen() PHP method to keep allowing usage of null value when computing the length of a string as null value is no longer allowed with PHP 8.1+
|
||||
*
|
||||
* @param string|null $sString
|
||||
*
|
||||
* @return int Length of $sString, 0 if null
|
||||
* @since 3.0.2 N°5172
|
||||
*/
|
||||
public static function StrLen(?string $sString): int
|
||||
{
|
||||
return strlen($sString ?? '');
|
||||
}
|
||||
|
||||
//----------------------------------------------
|
||||
// Environment helpers
|
||||
//----------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user