diff --git a/module/common/model.php b/module/common/model.php index f7ef618163..1d29699806 100644 --- a/module/common/model.php +++ b/module/common/model.php @@ -813,10 +813,9 @@ class commonModel extends model $new->subStatus = $default; } } - $dateFields = array(); - $stmt = $dao->select('`field`')->from(TABLE_WORKFLOWFIELD)->where('`module`')->eq($moduleName)->andWhere('`control`')->in(array('data', 'datetime')); - while($row = $stmt->fetch()) $dateFields[$row->field] = $row->field; + $rows = $dao->select('`field`')->from(TABLE_WORKFLOWFIELD)->where('`module`')->eq($moduleName)->andWhere('`control`')->in(array('data', 'datetime'))->fetchAll(); + foreach($rows as $row) $dateFields[$row->field] = $row->field; } $changes = array();