@@ -237,7 +237,7 @@ public static function addHistoryRow($form_id, $submission_id, $change_type, $da
237237 "sh___change_account_id " => $ account_id
238238 );
239239
240- while ( list ( $ col , $ value ) = each ( $ data ) ) {
240+ foreach ( $ data as $ col => $ value ) {
241241 // ignore any special fields, or the last_modified_date
242242 if (in_array ($ col , array (
243243 "sh___change_date " ,
@@ -264,7 +264,7 @@ public static function addHistoryRow($form_id, $submission_id, $change_type, $da
264264 // if there IS no last history row data, we're not interested in what fields have changed, since
265265 // it will look like ALL have. Instead, we just log the new history with blank for that field
266266 if (!empty ($ last_history_row_data )) {
267- while ( list ( $ col , $ value ) = each ( $ data ) ) {
267+ foreach ( $ data as $ col => $ value ) {
268268 // ignore any special fields
269269 if (in_array ($ col , array (
270270 "sh___change_date " ,
@@ -569,7 +569,7 @@ public static function generateChangeList($form_id, $history_id, $L)
569569 $ submission_info = Submissions::getSubmission ($ form_id , $ submission_id );
570570
571571 $ fields = array ();
572- while ( list ( $ col , $ value ) = each ( $ history_info ) ) {
572+ foreach ( $ history_info as $ col => $ value ) {
573573 // ignore any special fields
574574 if (in_array ($ col , array (
575575 "sh___change_date " ,
@@ -1017,7 +1017,7 @@ public static function undeleteSubmission($form_id, $history_id, $L)
10171017
10181018 $ columns = array ();
10191019 $ pairs = array ();
1020- while ( list ( $ col , $ value ) = each ( $ data ) ) {
1020+ foreach ( $ data as $ col => $ value ) {
10211021 // ignore any special fields, or the last_modified_date
10221022 if (in_array ($ col , array (
10231023 "sh___change_date " ,
0 commit comments