For some customer orders the shipping buttons are not visible

For some sales orders there are no buttons to proceed with the shipping of goods. For other sales orders the buttons appear. We make all the orders in the same way.
Does anyone has the same problem? How can I solve this?
Regards
Davy

Fatal error: Uncaught TypeError: array_push(): Argument #1 ($array) must be of type array, int given in /customers/3/3/0/metron-technics.be/httpd.www/erp/htdocs/product/class/product.class.php:4849 Stack trace: #0 /customers/3/3/0/metron-technics.be/httpd.www/erp/htdocs/product/class/product.class.php(4849): array_push(1, ‘1476’) #1 /customers/3/3/0/metron-technics.be/httpd.www/erp/htdocs/product/class/product.class.php(4849): Product->getChildsArbo(‘1881’, 0, 2, 1) #2 /customers/3/3/0/metron-technics.be/httpd.www/erp/htdocs/product/class/product.class.php(4875): Product->getChildsArbo(‘1886’) #3 /customers/3/3/0/metron-technics.be/httpd.www/erp/htdocs/expedition/shipment.php(815): Product->get_sousproduits_arbo() #4 {main} thrown in /customers/3/3/0/metron-technics.be/httpd.www/erp/htdocs/product/class/product.class.php on line 4849

Hello,

Sounds like a bug, can you report that to Issues · Dolibarr/dolibarr · GitHub ?

This seems to solve the problem.

4848 to 4854

if (empty($firstlevelonly)) {
array_push($parents, $rec[‘rowid’]);
$listofchilds = $this->getChildsArbo($rec[‘rowid’], 0, $level + 1, $parents);
foreach ($listofchilds as $keyChild => $valueChild) {
$prods[$rec[‘rowid’]][‘childs’][$keyChild] = $valueChild;
}
}

In the version 16.04 the problem still persists FATAL ERROR with code

if (empty($firstlevelonly)) {
				$listofchilds = $this->getChildsArbo($rec['rowid'], 0, $level + 1, array_push($parents, $rec['rowid']));
				foreach ($listofchilds as $keyChild => $valueChild) {
					$prods[$rec['rowid']]['childs'][$keyChild] = $valueChild;
				}
			}
		}

Line 4856 - 4863