r4315 bugfix: got rid of two PHP notices
authorAlexey Andriyanov <alan@al-an.info>
Thu, 10 Mar 2011 13:02:02 +0000 (13:02 +0000)
committerAlexey Andriyanov <alan@al-an.info>
Thu, 10 Mar 2011 13:02:02 +0000 (13:02 +0000)
renderRSPoolLBForm: quoted array keys
renderVServiceLBForm: idem
ciscoReadInterfaceStatus: removed unused and sometimes undefined $type variable

wwwroot/inc/deviceconfig.php
wwwroot/inc/interface.php

index 4b906a4a24128b2e39492780e29c888fcfb46bf0..7da93cbd40ca79599a126c849bc0e72a68c1a9c6 100644 (file)
@@ -1442,7 +1442,7 @@ function ciscoReadInterfaceStatus ($text)
                                $field_list = preg_split('/\s+/', $rest);
                                if (count ($field_list) < 4)
                                        break;
-                               list ($status_raw, $vlan, $duplex, $speed, $type) = $field_list;
+                               list ($status_raw, $vlan, $duplex, $speed) = $field_list;
                                if ($status_raw == 'connected' || $status_raw == 'up')
                                        $status = 'up';
                                elseif ($status_raw == 'notconnect' || $status_raw == 'down')
index 101067ac5abbddb02d6528b7eeffd8b076f704f5..8623cbc6329068a4549168d50863b28963d14e98 100644 (file)
@@ -5138,9 +5138,9 @@ function renderRSPoolLBForm ($pool_id)
                foreach ($vslist as $vs_id => $configs)
                        $triplets[] = array(
                                'ids' => array(
-                                       object_id => $object_id,
-                                       vs_id => $vs_id,
-                                       pool_id => $pool_id
+                                       'object_id' => $object_id,
+                                       'vs_id' => $vs_id,
+                                       'pool_id' => $pool_id
                                ),
                                'rsconfig' => $configs['rsconfig'],
                                'vsconfig' => $configs['vsconfig'],
@@ -5162,9 +5162,9 @@ function renderVServiceLBForm ($vs_id)
                foreach ($rspinfo['lblist'] as $object_id => $configs)
                        $triplets[] = array(
                                'ids' => array(
-                                       object_id => $object_id,
-                                       vs_id => $vs_id,
-                                       pool_id => $pool_id
+                                       'object_id' => $object_id,
+                                       'vs_id' => $vs_id,
+                                       'pool_id' => $pool_id
                                ),
                                'rsconfig' => $configs['rsconfig'],
                                'vsconfig' => $configs['vsconfig'],