Permalink
Browse files

BUGFIX: If modifier class deleted after added to an Order error was

thrown.
  • Loading branch information...
1 parent 6e8dc29 commit 2fd5bdaf48dbb6bb6ad5123d8d9560ae1f9cfc6d @frankmullenger committed Apr 23, 2012
Showing with 4 additions and 2 deletions.
  1. +4 −2 code/order/Order.php
View
@@ -649,8 +649,10 @@ function addModifiersAtCheckout(Array $data) {
//Save new Modifications
if (isset($data['Modifiers']) && is_array($data['Modifiers'])) foreach ($data['Modifiers'] as $modifierClass => $value) {
- $modifier = new $modifierClass();
- $modifier->addToOrder($this, $value);
+ if (class_exists($modifierClass)) {
+ $modifier = new $modifierClass();
+ $modifier->addToOrder($this, $value);
+ }
}
$this->updateTotal();
}

0 comments on commit 2fd5bda

Please sign in to comment.