r4312 bugfix: undefined index: 'mode' in ios12PickSwitchportCommand
authorAlexey Andriyanov <alan@al-an.info>
Thu, 10 Mar 2011 11:03:58 +0000 (11:03 +0000)
committerAlexey Andriyanov <alan@al-an.info>
Thu, 10 Mar 2011 11:03:58 +0000 (11:03 +0000)
wwwroot/inc/deviceconfig.php

index 18e4e6ea933cfd2fb2c93c7c0b2e1801bd567f19..0701bfa81254a6fa0c9723c8cdbc675c410cdd3a 100644 (file)
@@ -243,7 +243,7 @@ function ios12PickSwitchportCommand (&$work, $line)
        if ($line[0] != ' ') // end of interface section
        {
                // save work, if it makes sense
        if ($line[0] != ' ') // end of interface section
        {
                // save work, if it makes sense
-               switch ($work['current']['mode'])
+               switch (@$work['current']['mode'])
                {
                case 'access':
                        if (!array_key_exists ('access vlan', $work['current']))
                {
                case 'access':
                        if (!array_key_exists ('access vlan', $work['current']))