diff --git a/application/WarehouseHistory/WarehouseHistoryController.php b/application/WarehouseHistory/WarehouseHistoryController.php index 5691222bf..396efbb39 100644 --- a/application/WarehouseHistory/WarehouseHistoryController.php +++ b/application/WarehouseHistory/WarehouseHistoryController.php @@ -3,7 +3,8 @@ class WarehouseHistoryController { public function create($postData, $mod) { - $modelClass = class_exists($mod . 'Model') ? new ($mod . 'Model')() : new $mod(); + $modelClass = class_exists($mod . 'Model') ? $mod . 'Model' : $mod; + $modelClass = new $modelClass(); $currentData = $modelClass::get($postData['id']); $me = new User(); $me->loadMe();