From db20244212cd73a4f19975e30200c37a63ca980f Mon Sep 17 00:00:00 2001 From: Pierre Goiffon Date: Wed, 19 Jun 2019 16:13:29 +0200 Subject: [PATCH] =?UTF-8?q?N=C2=B02174=20External=20field=20label=20retrie?= =?UTF-8?q?val=20:=20fix=20default=20value=20\AttributeDefinition::GetLabe?= =?UTF-8?q?l=20with=20default=20null=20was=20returning=20att=20code=20!!?= =?UTF-8?q?=20Added=20PHPDoc=20and=20changed=20default=20value?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/attributedef.class.inc.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/core/attributedef.class.inc.php b/core/attributedef.class.inc.php index e75e0d590b..16f07ada5b 100644 --- a/core/attributedef.class.inc.php +++ b/core/attributedef.class.inc.php @@ -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; }