Details
-
Type: Bug
-
Status: Closed
-
Priority: Major
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: 5.0.4
-
Component/s: None
-
Labels:None
Description
To reproduce:
- Add CWP module, server, and server group
- Create package with the server group
- Remove server from server group
- Assign the package to an order form
- Try to error the package and receive a fatal error
In the model OrderOrders::add() replace:
if (empty($service_ids)) { return; }
With
if (empty($service_ids)) { if (($errors = $this->Services->errors())) { $this->Input->setErrors($errors); } return; }
Update the controller Checkout::createOrder() method replace:
// Get invoice collection $presenter = $this->Invoices->getPresenter($order->invoice_id); $collection = $presenter->collection(); // Add affiliate referral $affiliate_code = isset($_COOKIE['affiliate_code']) ? $_COOKIE['affiliate_code'] : null; if (!empty($order) && !empty($affiliate_code)) {
with
// Add affiliate referral $affiliate_code = isset($_COOKIE['affiliate_code']) ? $_COOKIE['affiliate_code'] : null; if (!empty($order) && !empty($affiliate_code)) { // Get invoice collection $presenter = $this->Invoices->getPresenter($order->invoice_id); $collection = $presenter->collection();