From 42a41b4a604dbf7b29c7170775b67f350d33ca6a Mon Sep 17 00:00:00 2001 From: Lisa Ridley Date: Sat, 7 May 2022 14:36:37 -0400 Subject: [PATCH] #350: Patch PatternDefinitionField constructor to default label to name if label does not exist. --- src/Definition/PatternDefinitionField.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Definition/PatternDefinitionField.php b/src/Definition/PatternDefinitionField.php index be33e402..64bb5571 100644 --- a/src/Definition/PatternDefinitionField.php +++ b/src/Definition/PatternDefinitionField.php @@ -35,7 +35,7 @@ public function __construct($name, $value) { } else { $this->definition['name'] = !isset($value['name']) ? $name : $value['name']; - $this->definition['label'] = $value['label']; + $this->definition['label'] = !isset($value['label']) ? $this->definition['name'] : $value['label']; $this->definition = $value + $this->definition; } }