ganglia / ganglia-web

Ganglia Web Frontend
BSD 3-Clause "New" or "Revised" License
317 stars 169 forks source link

physical_view.php not compatible with PHP 8 #380

Open iGeorgeX opened 5 months ago

iGeorgeX commented 5 months ago

In line 102 a

while (list($rack,) = each($racks)) {

is used and this leads to physical_view.php not running with PHP 8.

Instead of

while (list($rack,) = each($racks)) {
         # In our convention, y=0 is close to the floor. (Easier to wire up)
         krsort($racks[$rack]);
      }

It should be better

foreach ($racks as $rack => $values) {
        // In our convention, y=0 is close to the floor. (Easier to wire up)
       krsort($racks[$rack]);
      }
berlin2123 commented 5 months ago

fixed all 'while each()' now