N°2174 External field label retrieval : fix default value

\AttributeDefinition::GetLabel with default null was returning att code !! Added PHPDoc and changed default value
This commit is contained in:
Pierre Goiffon
2019-06-19 16:13:29 +02:00
parent 6f9f74e72f
commit db20244212

View File

@@ -512,7 +512,7 @@ abstract class AttributeDefinition
}
/**
* @param string|null $sDefault
* @param string|null $sDefault if null, will return the attribute code replacing "_" by " "
*
* @return string
*
@@ -6551,8 +6551,9 @@ class AttributeExternalField extends AttributeDefinition
*/
public function GetLabel($sDefault = null)
{
$sLabel = parent::GetLabel(null);
if (!is_null($sLabel))
$sLabelDefaultValue = '';
$sLabel = parent::GetLabel($sLabelDefaultValue);
if ($sLabelDefaultValue !== $sLabel)
{
return $sLabel;
}