Fix error method not defined

This commit is contained in:
Laurent Destailleur 2021-11-11 14:37:25 +01:00
parent a3d2dcb97f
commit 9cb094b466

View File

@ -1299,7 +1299,7 @@ if (!$error && ($massaction == 'delete' || ($action == 'delete' && $confirm == '
continue;
}
if ($objecttmp->is_erasable() <= 0) {
if (method_exists($objecttmp, 'is_erasable') && $objecttmp->is_erasable() <= 0) {
$langs->load("errors");
$nbignored++;
$TMsg[] = '<div class="error">'.$langs->trans('ErrorRecordHasChildren').' '.$objecttmp->ref.'</div><br>';