getRenderedIPv4NetCapacity: missing key access fix
authorAlexey Andriyanov <alan@al-an.info>
Tue, 18 Feb 2014 12:57:51 +0000 (16:57 +0400)
committerAlexey Andriyanov <alan@al-an.info>
Tue, 18 Feb 2014 12:57:51 +0000 (16:57 +0400)
missing key dereference was performed when displaying usage for
unallocated IPv4 space

wwwroot/inc/interface-lib.php

index b172ab381c0f25bac897516fff2c4c7f7f3c231f..ca92b03c5289e9ac8f0d65ce5bce66ec9e2243c9 100644 (file)
@@ -595,7 +595,7 @@ function getRenderedIPv4NetCapacity ($range)
                $total = ip4_range_size ($range);
 
                // compute $a_total: own range size, without subranges
-               if ($range['kidc'] == 0)
+               if (! isset ($range['kidc']) or $range['kidc'] == 0)
                        $a_total = $total;
                else
                {