2
0
forked from Wavyzz/dolibarr

Fix fatal error occuring if fk_parent_line set to false (#33412)

This commit is contained in:
Yannis Hoareau
2025-03-12 18:23:56 +00:00
committed by GitHub
parent 1d32f66d35
commit 9bf2b187f9

View File

@@ -3397,7 +3397,9 @@ abstract class CommonObject
while ($i < $num) {
$row = $this->db->fetch_row($resql);
$rows[] = $row[0]; // Add parent line into array rows
$children = $this->getChildrenOfLine($row[0], $grandchild);
if ($fk_parent_line) {
$children = $this->getChildrenOfLine($row[0], $grandchild);
}
if (!empty($children)) {
foreach ($children as $child) {
array_push($rows, $child);