Skip to content

Commit 25400e7

Browse files
committed
[FIX] PHP 8.3 fixes.
1 parent ef7241f commit 25400e7

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

core/functions/actions/mutate_content.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -717,6 +717,7 @@ function renderFormElement(
717717

718718
$field_html = '';
719719
$cimode = strpos($field_type, ':');
720+
static $i = 0;
720721
if ($cimode === false) {
721722
switch ($field_type) {
722723
case "text": // handler for regular text boxes
@@ -825,7 +826,6 @@ function renderFormElement(
825826
$index_list = ParseIntputOptions(ProcessTVCommand($field_elements, $field_id, '', 'tvform',
826827
$tvsArray));
827828
$tpl = '<label class="checkbox"><input type="checkbox" value="%s" id="tv_%s" name="tv%s[]" %s onchange="documentDirty=true;" />%s</label><br />';
828-
static $i = 0;
829829
$_ = array();
830830
foreach ($index_list as $c => $item) {
831831
if (is_array($item)) {
@@ -852,9 +852,7 @@ function renderFormElement(
852852
$field_html = implode("\n", $_);
853853
break;
854854
case "option": // handles radio buttons
855-
$index_list = ParseIntputOptions(ProcessTVCommand($field_elements, $field_id, '', 'tvform',
856-
$tvsArray));
857-
static $i = 0;
855+
$index_list = ParseIntputOptions(ProcessTVCommand($field_elements, $field_id, '', 'tvform', $tvsArray));
858856
foreach($index_list as $item => $itemvalue) {
859857
[$item, $itemvalue] = (is_array($itemvalue)) ? $itemvalue : array_merge(explode("==", $itemvalue), ['']);
860858
if (strlen($itemvalue) == 0) {

core/functions/tv.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -679,6 +679,7 @@ function renderFormElement(
679679

680680
$field_html = '';
681681
$cimode = strpos($field_type, ':');
682+
static $i = 0;
682683
if ($cimode === false) {
683684
switch ($field_type) {
684685

@@ -821,7 +822,6 @@ function renderFormElement(
821822
, $tvsArray)
822823
);
823824
$tpl = '<label class="checkbox"><input type="checkbox" value="%s" id="tv_%s" name="tv%s[]" %s onchange="documentDirty=true;" />%s</label><br />';
824-
static $i = 0;
825825
$_ = array();
826826
foreach ($index_list as $c => $item) {
827827
if (is_array($item)) {
@@ -858,7 +858,6 @@ function renderFormElement(
858858
, $tvsArray
859859
)
860860
);
861-
static $i = 0;
862861
foreach ($index_list as $item => $itemvalue) {
863862
if (is_array($itemvalue)) {
864863
list($item, $itemvalue) = $itemvalue;

0 commit comments

Comments
 (0)