mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-02-08 00:52:01 +01:00
Fix error message with old usage of childtables
This commit is contained in:
@@ -3322,7 +3322,14 @@ abstract class CommonObject
|
||||
$langs->load("errors");
|
||||
//print 'Found into table '.$table.', type '.$langs->transnoentitiesnoconv($elementname).', haschild='.$haschild;
|
||||
$haschild += $obj->nb;
|
||||
$this->errors[]=$langs->trans("ErrorRecordHasAtLeastOneChildOfType", $langs->transnoentitiesnoconv($elementname));
|
||||
if (is_numeric($elementname)) // old usage
|
||||
{
|
||||
$this->errors[]=$langs->trans("ErrorRecordHasAtLeastOneChildOfType", $table);
|
||||
}
|
||||
else // new usage: $elementname=Translation key
|
||||
{
|
||||
$this->errors[]=$langs->trans("ErrorRecordHasAtLeastOneChildOfType", $langs->transnoentitiesnoconv($elementname));
|
||||
}
|
||||
break; // We found at least one, we stop here
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user