Commit 6bee8703 authored by Eric - kg6wxc's avatar Eric - kg6wxc
Browse files

Fixed issues with the station Pop-Ups.

The array that was fixed for PHP 7.2.3 was not fixed right.
This resulted in missing/inaccurate info in the station pop-ups.

Part of the array was reinitializing when it should not have, since it
was already created at that point.

a pretty simple if (is_array()) { ... }else { ... } fixes it.
parent 8abe7a89
......@@ -345,7 +345,6 @@ function load_LinkedTO($node_info, $TopoList)
{
//this is the section that is exploding in php7.2.3
if ($value['linkto'] == $node)
{
//this will be the cost FROM each linked station back TO the node we are currently looking at in the while loop
......@@ -354,7 +353,12 @@ function load_LinkedTO($node_info, $TopoList)
//the new line
//had to create the array correctly! fixed 3-28-2018 - wxc
$linkInfoForStationPopups[$node_info['node']][$value['node']] = array('costFrom' => $value['cost'], 'costTo' => "", 'distance' => "", 'bearing' => "");
if (is_array($linkInfoForStationPopups[$node_info['node']][$value['node']])) {
$linkInfoForStationPopups[$node_info['node']][$value['node']]["costFrom"] = $value['cost'];
}else {
// $linkInfoForStationPopups[$node_info['node']][$value['node']] = array('costFrom' => $value['cost'], 'costTo' => "", 'distance' => "", 'bearing' => "");
$linkInfoForStationPopups[$node_info['node']][$value['node']] = array('costFrom' => $value['cost']);
}
}
if ($value['node'] == $node)
{
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment