mirror of
https://github.com/Yetangitu/ampache
synced 2025-10-05 02:39:47 +02:00
Fix latest Scrutinizer reported errors
This commit is contained in:
parent
80cd08ed04
commit
504013ae66
6 changed files with 24 additions and 23 deletions
|
@ -86,13 +86,14 @@ $rootMediaItems[] = Upnp_Api::_videoMetadata('');
|
|||
}
|
||||
|
||||
$totMatches = count($items);
|
||||
if ($totMatches == 0) {
|
||||
if ($items == null || $totMatches == 0) {
|
||||
$domDIDL = Upnp_Api::createDIDL('');
|
||||
$numRet = 0;
|
||||
} else {
|
||||
if ($upnpRequest['requestedcount'] == 0) {
|
||||
$upnpRequest['requestedcount'] = $totMatches - $upnpRequest['startingindex'];
|
||||
}
|
||||
|
||||
$slicedItems = array_slice($items, $upnpRequest['startingindex'], $upnpRequest['requestedcount']);
|
||||
$domDIDL = Upnp_Api::createDIDL($slicedItems);
|
||||
$numRet = count($slicedItems);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue