Plugin Directory

Changeset 3471264


Ignore:
Timestamp:
02/27/2026 05:35:09 PM (4 weeks ago)
Author:
whiteshadow
Message:

Fix two PHP deprecation notices about "Using null as an array offset is deprecated, use an empty string instead" in the RadioGroup control.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • admin-menu-editor/trunk/customizables/Controls/RadioGroup.php

    r3405870 r3471264  
    9191            echo $beforeOption;
    9292            $labelClasses = ['ame-rg-option-label'];
    93             if ( isset($this->choiceChildren[$option->value]) ) {
     93            if ( is_string($option->value) && isset($this->choiceChildren[$option->value]) ) {
    9494                $labelClasses[] = 'ame-rg-has-choice-child';
    9595            }
     
    129129            echo $afterOption;
    130130
    131             if ( isset($this->choiceChildren[$option->value]) ) {
     131            if ( is_string($option->value) && isset($this->choiceChildren[$option->value]) ) {
    132132                $childControl = $this->choiceChildren[$option->value];
    133133                echo HtmlHelper::tag('span', ['class' => 'ame-rg-nested-control']);
Note: See TracChangeset for help on using the changeset viewer.