mirror of
https://github.com/Combodo/iTop.git
synced 2026-02-13 07:24:13 +01:00
N°4517 - PHP 8.1 compatibility: Replace strlen with Utils::StrLen to avoid null value issue
This commit is contained in:
@@ -119,7 +119,7 @@ class CriterionToOQL extends CriterionConversionAbstract
|
||||
$aValues = self::GetValues($aCriteria);
|
||||
$sValue = self::GetValue($aValues, 0);
|
||||
|
||||
if (!Utils::StrLen($sValue)) {
|
||||
if (!\Utils::StrLen($sValue)) {
|
||||
return "1";
|
||||
}
|
||||
|
||||
@@ -131,7 +131,7 @@ class CriterionToOQL extends CriterionConversionAbstract
|
||||
$aValues = self::GetValues($aCriteria);
|
||||
$sValue = self::GetValue($aValues, 0);
|
||||
|
||||
if (!Utils::StrLen($sValue)) {
|
||||
if (!\Utils::StrLen($sValue)) {
|
||||
return "1";
|
||||
}
|
||||
|
||||
@@ -143,7 +143,7 @@ class CriterionToOQL extends CriterionConversionAbstract
|
||||
$aValues = self::GetValues($aCriteria);
|
||||
$sValue = self::GetValue($aValues, 0);
|
||||
|
||||
if (!Utils::StrLen($sValue)) {
|
||||
if (!\Utils::StrLen($sValue)) {
|
||||
return "1";
|
||||
}
|
||||
|
||||
@@ -159,7 +159,7 @@ class CriterionToOQL extends CriterionConversionAbstract
|
||||
return "({$sRef} = '0')";
|
||||
}
|
||||
|
||||
if (!Utils::StrLen($sValue) && (!(isset($aCriteria['has_undefined'])) || !($aCriteria['has_undefined']))) {
|
||||
if (!\Utils::StrLen($sValue) && (!(isset($aCriteria['has_undefined'])) || !($aCriteria['has_undefined']))) {
|
||||
return "1";
|
||||
}
|
||||
|
||||
@@ -171,7 +171,7 @@ class CriterionToOQL extends CriterionConversionAbstract
|
||||
$aValues = self::GetValues($aCriteria);
|
||||
$sValue = self::GetValue($aValues, 0);
|
||||
|
||||
if (!Utils::StrLen($sValue)) {
|
||||
if (!\Utils::StrLen($sValue)) {
|
||||
return "1";
|
||||
}
|
||||
|
||||
@@ -186,7 +186,7 @@ class CriterionToOQL extends CriterionConversionAbstract
|
||||
for($i = 0; $i < count($aValues); $i++)
|
||||
{
|
||||
$sRawValue = self::GetValue($aValues, $i);
|
||||
if (!Utils::StrLen($sRawValue)) {
|
||||
if (!\Utils::StrLen($sRawValue)) {
|
||||
$bHasUnDefined = true;
|
||||
} else {
|
||||
$aRawValues[] = $sRawValue;
|
||||
|
||||
Reference in New Issue
Block a user