Skip to content

Commit 1799b6c

Browse files
committed
2.1.0 - PHP 8 compatibility
1 parent 33e7263 commit 1799b6c

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

code/Code.class.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -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",

code/Module.class.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ class Module extends FormToolsModule
2222
protected $author = "Ben Keen";
2323
protected $authorEmail = "ben.keen@gmail.com";
2424
protected $authorLink = "https://formtools.org";
25-
protected $version = "2.0.5";
26-
protected $date = "2019-05-29";
25+
protected $version = "2.1.0";
26+
protected $date = "2023-02-26";
2727
protected $originLanguage = "en_us";
2828

2929
protected $nav = array(

view_deleted_submission.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
$fields = Code::getHistoryItem($form_id, $history_id);
2424

2525
$clean_fields = array();
26-
while (list($col_name, $value) = each($fields)) {
26+
foreach ($fields as $col_name => $value) {
2727
// ignore any special fields, or the last_modified_date
2828
if (in_array($col_name, array(
2929
"sh___change_date",

0 commit comments

Comments
 (0)