Skip to content

Commit

Permalink
[FIX] PHP 8.3 fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
Seiger committed Feb 2, 2024
1 parent ef7241f commit 25400e7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
6 changes: 2 additions & 4 deletions core/functions/actions/mutate_content.php
Original file line number Diff line number Diff line change
Expand Up @@ -717,6 +717,7 @@ function renderFormElement(

$field_html = '';
$cimode = strpos($field_type, ':');
static $i = 0;
if ($cimode === false) {
switch ($field_type) {
case "text": // handler for regular text boxes
Expand Down Expand Up @@ -825,7 +826,6 @@ function renderFormElement(
$index_list = ParseIntputOptions(ProcessTVCommand($field_elements, $field_id, '', 'tvform',
$tvsArray));
$tpl = '<label class="checkbox"><input type="checkbox" value="%s" id="tv_%s" name="tv%s[]" %s onchange="documentDirty=true;" />%s</label><br />';
static $i = 0;
$_ = array();
foreach ($index_list as $c => $item) {
if (is_array($item)) {
Expand All @@ -852,9 +852,7 @@ function renderFormElement(
$field_html = implode("\n", $_);
break;
case "option": // handles radio buttons
$index_list = ParseIntputOptions(ProcessTVCommand($field_elements, $field_id, '', 'tvform',
$tvsArray));
static $i = 0;
$index_list = ParseIntputOptions(ProcessTVCommand($field_elements, $field_id, '', 'tvform', $tvsArray));
foreach($index_list as $item => $itemvalue) {
[$item, $itemvalue] = (is_array($itemvalue)) ? $itemvalue : array_merge(explode("==", $itemvalue), ['']);
if (strlen($itemvalue) == 0) {
Expand Down
3 changes: 1 addition & 2 deletions core/functions/tv.php
Original file line number Diff line number Diff line change
Expand Up @@ -679,6 +679,7 @@ function renderFormElement(

$field_html = '';
$cimode = strpos($field_type, ':');
static $i = 0;
if ($cimode === false) {
switch ($field_type) {

Expand Down Expand Up @@ -821,7 +822,6 @@ function renderFormElement(
, $tvsArray)
);
$tpl = '<label class="checkbox"><input type="checkbox" value="%s" id="tv_%s" name="tv%s[]" %s onchange="documentDirty=true;" />%s</label><br />';
static $i = 0;
$_ = array();
foreach ($index_list as $c => $item) {
if (is_array($item)) {
Expand Down Expand Up @@ -858,7 +858,6 @@ function renderFormElement(
, $tvsArray
)
);
static $i = 0;
foreach ($index_list as $item => $itemvalue) {
if (is_array($itemvalue)) {
list($item, $itemvalue) = $itemvalue;
Expand Down

0 comments on commit 25400e7

Please sign in to comment.