[solved]warning/error vlan_edit or add



  • Warning: gettext() expects parameter 1 to be string, array given in /usr/local/www/classes/Form/Select.class.php on line 69 Call Stack: 0.0039 120616 1\. {main}() /usr/local/www/interfaces_vlan_edit.php:0 0.2328 951616 2\. Form->__toString() /usr/local/www/interfaces_vlan_edit.php:220 0.2329 951812 3\. implode() /usr/local/www/classes/Form.class.php:101 0.2329 951856 4\. Form_Section->__toString() /usr/local/www/classes/Form.class.php:101 0.2330 952152 5\. implode() /usr/local/www/classes/Form/Section.class.php:69 0.2330 952292 6\. Form_Group->__toString() /usr/local/www/classes/Form/Section.class.php:69 0.2331 952548 7\. implode() /usr/local/www/classes/Form/Group.class.php:134 0.2331 952600 8\. Form_Input->__toString() /usr/local/www/classes/Form/Group.class.php:134 0.2331 952660 9\. Form_Select->_getInput() /usr/local/www/classes/Form/Input.class.php:192 0.2334 953152 10\. gettext() /usr/local/www/classes/Form/Select.class.php:69 
    

    it has something todo with L169-L181

    $section->addInput(new Form_Select(
            'if',
            'Parent Interface',
            $pconfig['if'],
            array_combine(
                    array_keys($portlist),
                    array_map(
                            function($key, $value) {
                                    return (is_jumbo_capable($key)) ? "{$key} ({$value['mac']})" : $valu
                            },
                            array_keys($portlist),
                            array_values($portlist)
                    )
            ),
            false
    ))->setWidth(6)->setHelp('Only VLAN capable interfaces will be shown.');
    
    

  • Developer Netgate

    Thanks. Attempting to reproduce this but no luck so far. What interfaces do you have configured?


  • Developer Netgate

    Found a box that showed the same symptoms.

    The code used to generate the options list was replaced with something safer and the error no longer occurs on that box.

    Would you mind testing please?



  • that fixed it thanks


Log in to reply