Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug if tag contains only "0" #368

Open
MightyCreak opened this issue Apr 2, 2019 · 1 comment
Open

Bug if tag contains only "0" #368

MightyCreak opened this issue Apr 2, 2019 · 1 comment

Comments

@MightyCreak
Copy link
Contributor

MightyCreak commented Apr 2, 2019

I happened to encounter a bug recently with Low Roar's album: "0".

Since empty("0") is true, there is a problem with this code in SongManager.php:

        // Song album
        if (!empty($file_infos['comments']['album'])) {
            $metadata['album'] = end($file_infos['comments']['album']);
        } else {
            $metadata['album'] = 'Unknown album';
        }

Do you think isset would be a better approach than empty?

@MightyCreak
Copy link
Contributor Author

Digging a little deeper, it seems that the issue is not from there, but could be coming from getID3 which probably has the same issue somewhere in their code...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant