FIX wrong error message
This commit is contained in:
parent
6fdb140f04
commit
c38437f0de
@ -4423,9 +4423,9 @@ abstract class CommonObject
|
|||||||
//print 'Found into table '.$table.', type '.$langs->transnoentitiesnoconv($elementname).', haschild='.$haschild;
|
//print 'Found into table '.$table.', type '.$langs->transnoentitiesnoconv($elementname).', haschild='.$haschild;
|
||||||
$haschild += $obj->nb;
|
$haschild += $obj->nb;
|
||||||
if (is_numeric($element) || empty($element['name'])) { // old usage
|
if (is_numeric($element) || empty($element['name'])) { // old usage
|
||||||
$this->errors[] = $langs->trans("ErrorRecordHasAtLeastOneChildOfType", method_exists($this, 'getNomUrl') ? $this->getNomUrl() : $this->ref, $table);
|
$this->errors[] = $langs->transnoentitiesnoconv("ErrorRecordHasAtLeastOneChildOfType", method_exists($this, 'getNomUrl') ? $this->getNomUrl() : $this->ref, $table);
|
||||||
} else { // new usage: $element['name']=Translation key
|
} else { // new usage: $element['name']=Translation key
|
||||||
$this->errors[] = $langs->trans("ErrorRecordHasAtLeastOneChildOfType", method_exists($this, 'getNomUrl') ? $this->getNomUrl() : $this->ref, $langs->transnoentitiesnoconv($element['name']));
|
$this->errors[] = $langs->transnoentitiesnoconv("ErrorRecordHasAtLeastOneChildOfType", method_exists($this, 'getNomUrl') ? $this->getNomUrl() : $this->ref, $langs->transnoentitiesnoconv($element['name']));
|
||||||
}
|
}
|
||||||
break; // We found at least one, we stop here
|
break; // We found at least one, we stop here
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user