Remove duplicate error handling for no registrations

This commit is contained in:
Laurent Destailleur 2026-04-03 04:14:02 +02:00 committed by GitHub
parent a83fcb1839
commit 4302c2d2c9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -246,13 +246,14 @@ if ($inputregistrationnumber && strlen($inputregistrationnumber) < 8) {
*/
print '<br>';
}
if ($num == 0) {
print img_picto('', 'cross', 'class="pictofixedwidth error"').$langs->trans("NoRegistrationFound");
print '<br>';
}
} else {
dol_print_error($db);
}
if ($num == 0) {
print img_picto('', 'cross', 'class="pictofixedwidth error"').$langs->trans("NoRegistrationFound");
print '<br>';
}
print '<br>';
@ -283,12 +284,13 @@ if ($inputregistrationnumber && strlen($inputregistrationnumber) < 8) {
*/
print '<br>';
}
if ($num == 0) {
print img_picto('', 'tick', 'class="pictofixedwidth"').$langs->trans("NoBackupRestorationOrLastLineDeletionDetected");
}
} else {
dol_print_error($db);
}
if ($num == 0) {
print img_picto('', 'tick', 'class="pictofixedwidth"').$langs->trans("NoBackupRestorationOrLastLineDeletionDetected");
}
print '<br>';
}
}