From 9967c9b7ad14516a95a5c408bc06e78bc2eeb75e Mon Sep 17 00:00:00 2001 From: Christian Weiske Date: Tue, 19 Dec 2017 21:17:56 +0100 Subject: [PATCH] Catch mediatomb browse errors --- src/mediatomb.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/mediatomb.php b/src/mediatomb.php index 96be27c..33b9bd8 100644 --- a/src/mediatomb.php +++ b/src/mediatomb.php @@ -25,6 +25,11 @@ function mediatombBrowse(Services_MediaTomb $smt, $fullPath, $prefix) $path = substr($fullPath, strlen($prefix)); $container = $smt->getContainerByPath($path); + if ($container === null) { + sendMessage('Error accessing ' . $fullPath); + return; + } + $listItems = array(); $it = $container->getItemIterator(false); -- 2.30.2