Skip to content

Commit

Permalink
PATCH: enforce sort number
Browse files Browse the repository at this point in the history
  • Loading branch information
sunnysideup committed Apr 9, 2018
1 parent c15eac5 commit e3aa41b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion code/model/process/OrderStep.php
Expand Up @@ -692,7 +692,11 @@ public function doStep(Order $order)
**/
public function nextStep(Order $order)
{
$where = '"OrderStep"."Sort" > '.$this->Sort;
$sort = (int) $this->Sort;
if(! $sort) {
$sort = 0;
}
$where = '"OrderStep"."Sort" > '.$sort;
$nextOrderStepObject = DataObject::get_one(
'OrderStep',
$where
Expand Down

0 comments on commit e3aa41b

Please sign in to comment.