Skip to content

Commit

Permalink
Fix a bug when merging higher level attributes into lower level attri…
Browse files Browse the repository at this point in the history
…butes
  • Loading branch information
dsilhavy committed Apr 24, 2023
1 parent ba3f4cc commit 3a525a4
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions Utils/MPDUtility.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ function profileListContainsAtLeastOne($list, $profiles)
}
return false;
}

function mpdProfilesContainsAtLeastOne($profiles)
{
global $mpdHandler;
Expand Down Expand Up @@ -118,7 +119,7 @@ function nextElementSibling($node)

function timeParsing($var)
{
return include 'impl/MPDUtility/timeParsing.php';
return include 'impl/MPDUtility/timeParsing.php';
}


Expand All @@ -140,7 +141,7 @@ function checkYearMonth($str)
}

$duration = ($Y[0] * 365 * 24 * 60 * 60) +
($Mo[0] * 30 * 24 * 60 * 60);
($Mo[0] * 30 * 24 * 60 * 60);

return ($duration > 0);
}
Expand All @@ -167,18 +168,20 @@ function formSegmentAccess($highLevel, $lowLevel)
if (!$lowValue[$k]) {
$lowValue[$k] = $v;
} elseif (gettype($lowValue[$k]) == 'array') {
//$v would also work, but this is more clear in meaning
//$v would also work, but this is more clear in meaning
$lowValue[$k] = formSegmentAccess($highValue[$k], $lowValue[$k]);
}
}
$lowLevel[$key] = $lowValue;
}
return $lowLevel;
}

function parseDoc($path)
{
$return_val = false;

$contents = file_get_contents($path);
$contents = file_get_contents($path);

$loaded = simplexml_load_file($path);
if (!$loaded) {
Expand Down

0 comments on commit 3a525a4

Please sign in to comment.