diff --git a/php/classes/TimeTableMgr.php b/php/classes/TimeTableMgr.php index 6341288..7c17b92 100644 --- a/php/classes/TimeTableMgr.php +++ b/php/classes/TimeTableMgr.php @@ -452,10 +452,11 @@ class TimeTableMgr extends AmdaObjectMgr $attributesToReturn['folderId'] = $folderId; if (!$onlyDescription) { - $intNodes = $dom->getElementsByTagName('intervals'); + $xpath = new DOMXPath($dom); - /** @var DOMElement $intNode */ - foreach ($intNodes as $intNode) { + $intervals = $xpath->query('//intervals'); + + foreach ($intervals as $intNode) { $startNodes = $intNode->getElementsByTagName('start'); if ($startNodes->length <= 0) { return ['error' => 'Error detected in result file']; -- libgit2 0.21.2