Skip to content

Commit 10fd43e

Browse files
committed
fix: consider to return empty array when is invalid field name
Signed-off-by: Vitor Mattos <[email protected]>
1 parent 37cadb0 commit 10fd43e

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lib/Service/Certificate/RulesService.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,9 @@ public function __construct(
5050
public function getRule(string $fieldName): array {
5151
if(!isset($this->rules[$fieldName]['helperText'])){
5252
$this->rules[$fieldName]['helperText'] = $this->getHelperText($fieldName);
53+
if (empty($this->rules[$fieldName]['helperText'])) {
54+
unset($this->rules[$fieldName]['helperText']);
55+
}
5356
}
5457
return $this->rules[$fieldName];
5558
}

0 commit comments

Comments
 (0)