N°5784 - Fix AttributeOneWayPassword::HasAValue() implementation

This commit is contained in:
Molkobain
2023-03-08 10:54:55 +01:00
parent 15f32bf843
commit 4bfc1747b7

View File

@@ -9762,10 +9762,14 @@ class AttributeOneWayPassword extends AttributeDefinition implements iAttributeN
{
// Protection against wrong value type
if (false === ($proposedValue instanceof ormPassword)) {
// On object creation, the attribute value is "" instead of an ormPassword...
if (is_string($proposedValue)) {
return utils::IsNotNullOrEmptyString($proposedValue);
}
return parent::HasAValue($proposedValue);
}
return $proposedValue->IsEmpty() !== false;
return $proposedValue->IsEmpty() === false;
}
}