From 4954f5aff865035d09bc43c22f9e13a249cbf50c Mon Sep 17 00:00:00 2001 From: tanghucheng Date: Tue, 2 Jul 2024 10:51:43 +0800 Subject: [PATCH] * [refac,2h,0h] Fix common::createChanges error. --- module/common/model.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) 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();