Updated AtdfService to support new Pad TDF elements

This commit is contained in:
Nav
2024-09-13 00:33:06 +01:00
parent 3dab50f4db
commit 179d7180a2
2 changed files with 44 additions and 6 deletions

View File

@@ -879,8 +879,13 @@ class ValidationService
. $pin->position . '")';
}
if (!empty($pin->padKey) && $tdf->getPad($pin->padKey) === null) {
$failures[] = 'Failed to resolve pad key "' . $pin->padKey . '"';
if ($pin->padKey !== null) {
if (empty(trim($pin->padKey))) {
$failures[] = 'Missing pad key';
} else if ($tdf->getPad($pin->padKey) === null) {
$failures[] = 'Failed to resolve pad key "' . $pin->padKey . '"';
}
}
return array_map(