Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

For some sales orders the shipping can not be made because of fatal error #23447

Closed
vrmaurice opened this issue Jan 8, 2023 · 3 comments
Closed
Labels
Bug This is a bug (something does not work as expected) Issue Stale (automatic label) This issue is stale because it has been open 1 year with no activity. Remove this label to keep open

Comments

@vrmaurice
Copy link

Bug

When creating a shipment from sales order sometimes there is no button to create the shipping. Other sales orders can create the shipping.

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(8, '899') #1 /customers/3/3/0/metron-technics.be/httpd.www/erp/htdocs/product/class/product.class.php(4849): Product->getChildsArbo('376', 0, 2, 8) #2 /customers/3/3/0/metron-technics.be/httpd.www/erp/htdocs/product/class/product.class.php(4875): Product->getChildsArbo('386') #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

Environment Version

16

Environment OS

Ubuntu Server

Environment Web server

Apache

Environment PHP

8

Environment Database

MySQL or MariaDB 10.3.37-MariaDB-1:10.3.37+maria~ubu2004

Environment URL(s)

No response

Expected and actual behavior

Expected :
a list of all items in the order is displayed
Selection of stock location present
Button to create shipping present

Actual :
List of items stuck at first line
Selection of stock location not present
Button to create shipping not present
Fatal error

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(8, '899') #1 /customers/3/3/0/metron-technics.be/httpd.www/erp/htdocs/product/class/product.class.php(4849): Product->getChildsArbo('376', 0, 2, 8) #2 /customers/3/3/0/metron-technics.be/httpd.www/erp/htdocs/product/class/product.class.php(4875): Product->getChildsArbo('386') #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

Steps to reproduce the behavior

No response

Attached files

Untitled-2

@vrmaurice vrmaurice added the Bug This is a bug (something does not work as expected) label Jan 8, 2023
@vrmaurice
Copy link
Author

This seems to work:
In file htdocs\product\class - kopie\product.class.php on line 4849 to 4850, paste this code.

array_push($parents, $rec['rowid']); $listofchilds = $this->getChildsArbo($rec['rowid'], 0, $level + 1, $parents);

@vrmaurice vrmaurice reopened this Jan 8, 2023
@ksar-ksar
Copy link
Contributor

Hello,

Dolibarr V16 was not compatible with PHP V8.
Have you tries with V18 ?

Copy link
Contributor

github-actions bot commented Dec 1, 2024

This issue is stale because it has been open 1 year with no activity. If this is a bug, please comment to confirm it is still present on latest stable version. if this is a feature request, please comment to notify the request is still relevant and not yet covered by latest stable version. This issue may be closed automatically by stale bot in 10 days (you should still be able to re-open it if required).

@github-actions github-actions bot added the Issue Stale (automatic label) This issue is stale because it has been open 1 year with no activity. Remove this label to keep open label Dec 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug This is a bug (something does not work as expected) Issue Stale (automatic label) This issue is stale because it has been open 1 year with no activity. Remove this label to keep open
Projects
None yet
Development

No branches or pull requests

2 participants