Guides & Tutorials8.0 Update TroubleshootingTroubleshooting an Oops! TypeError: Argument 2 Error upon Ordering

Troubleshooting an Oops! TypeError: Argument 2 Error upon Ordering

Symptom

After applying the 8.0.1 update, an Oops! error may be encountered when placing an order. The error details are as follows:

TypeError: Argument 2 passed to WHMCS\Order\Order::add() must be of the type int, string given, called in /path/to/whmcs/includes/orderfunctions.php on line 0 and defined in /path/to/whcmcs/vendor/whmcs/whmcs-foundation/lib/Order/Order.php:0

Solution

Please apply the 8.0.2 Maintenance Release via the Utilities > Update WHMCS page.

Hotfix

A hotfix has been created for 8.0.1 only to resolve this error:

https://whmcs.community/files/file/139-core-15456-order-number-generation/