[-] BO : Fiw warning on $current_order_state

This commit is contained in:
Gregory Roussac
2013-01-29 12:21:33 +01:00
parent 54fb5b7eb7
commit b51bf1af25
+1 -1
View File
@@ -1292,7 +1292,7 @@ class AdminOrdersControllerCore extends AdminController
// display warning if there are products out of stock
$display_out_of_stock_warning = false;
$current_order_state = $order->getCurrentOrderState();
if ($current_order_state->delivery != 1 && $current_order_state->shipped != 1)
if (!Validate::isLoadedObject($current_order_state) || ($current_order_state->delivery != 1 && $current_order_state->shipped != 1))
$display_out_of_stock_warning = true;
// products current stock (from stock_available)