Skip to content

Commit

Permalink
magento#10919: update OrderService to return correct bool value
Browse files Browse the repository at this point in the history
 - update OrderService to return correct bool value for cancel method
 - removed redundant type casting
  • Loading branch information
ishakhsuvarov authored Sep 18, 2017
1 parent db79dbf commit d4cddf7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/code/Magento/Sales/Model/Service/OrderService.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ public function __construct(
public function cancel($id)
{
$order = $this->orderRepository->get($id);
if ((bool)$order->canCancel()) {
if ($order->canCancel()) {
$order->cancel();
$this->orderRepository->save($order);
return true;
Expand Down

0 comments on commit d4cddf7

Please sign in to comment.