Skip to content

Commit

Permalink
Do not sort if not an array
Browse files Browse the repository at this point in the history
  • Loading branch information
tomchiverton authored May 26, 2023
1 parent 61d3b6c commit 81b0a0f
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions favorite.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<?php
// +------------------------------------------------------------------------+
// | O!MPD, Copyright © 2015-2021 Artur Sierzant |
// | O!MPD, Copyright © 2015-2021 Artur Sierzant |
// | http://www.ompd.pl |
// | |
// | |
// | netjukebox, Copyright © 2001-2012 Willem Bartels |
// | netjukebox, Copyright © 2001-2012 Willem Bartels |
// | |
// | http://www.netjukebox.nl |
// | http://forum.netjukebox.nl |
Expand Down Expand Up @@ -153,9 +153,9 @@ function home() {

require_once('include/play.inc.php');
$playlists = mpd('listplaylists');
sort($playlists, SORT_NATURAL);

if (count($playlists) > 0 && $playlists !== 'ACK_ERROR_UNKNOWN') {
if ( $playlists !== 'ACK_ERROR_UNKNOWN' && count($playlists) > 0 ) {
sort($playlists, SORT_NATURAL);
?>
<tr class="header">

Expand Down Expand Up @@ -987,4 +987,4 @@ function deleteFavoriteItem($favorite_id) {
}


?>
?>

0 comments on commit 81b0a0f

Please sign in to comment.