mirror of
https://github.com/Yetangitu/ampache
synced 2025-10-03 09:49:30 +02:00
Fix error message in the logs due to include
When include is not passed to `artists` or `albums` API function, it will default to `NULL`. Make it default to `[]` to avoid a message in the error log.
This commit is contained in:
parent
2053264888
commit
4c2b098c57
1 changed files with 6 additions and 0 deletions
|
@ -300,6 +300,9 @@ class XML_Data
|
||||||
*/
|
*/
|
||||||
public static function artists($artists, $include=[], $full_xml=true)
|
public static function artists($artists, $include=[], $full_xml=true)
|
||||||
{
|
{
|
||||||
|
if (null == $include) {
|
||||||
|
$include = array();
|
||||||
|
}
|
||||||
$string = '<total_count>' . count($artists) . '</total_count>\n';
|
$string = '<total_count>' . count($artists) . '</total_count>\n';
|
||||||
|
|
||||||
if (count($artists) > self::$limit or self::$offset > 0) {
|
if (count($artists) > self::$limit or self::$offset > 0) {
|
||||||
|
@ -365,6 +368,9 @@ class XML_Data
|
||||||
*/
|
*/
|
||||||
public static function albums($albums, $include=[], $full_xml=true)
|
public static function albums($albums, $include=[], $full_xml=true)
|
||||||
{
|
{
|
||||||
|
if (null == $include) {
|
||||||
|
$include = array();
|
||||||
|
}
|
||||||
$string = '<total_count>' . count($albums) . '</total_count>\n';
|
$string = '<total_count>' . count($albums) . '</total_count>\n';
|
||||||
|
|
||||||
if (count($albums) > self::$limit or self::$offset > 0) {
|
if (count($albums) > self::$limit or self::$offset > 0) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue