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

getid3.lib.php - Error line 1590 #316

Open
gudbergsen opened this issue May 13, 2021 · 3 comments
Open

getid3.lib.php - Error line 1590 #316

gudbergsen opened this issue May 13, 2021 · 3 comments

Comments

@gudbergsen
Copy link

Line 1590 in getid3.lib.php has an error

if (is_array($value) || empty($ThisFileInfo['comments'][$tagname]) || !in_array(trim($value), $ThisFileInfo['comments'][$tagname])) {
must be

if (is_array($value) || empty($ThisFileInfo['comments'][$tagname]) || !in_array(trim($key), $ThisFileInfo['comments'][$tagname])) {

@JamesHeinrich
Copy link
Owner

I assume you're referring to what is now line 1587.

I don't think I agree with your proposed change. This line should prevent adding duplicate string values to the array, therefore we check the value.
If you still disagree, perhaps you can show an example of how/why you think it's not working correctly?

@gudbergsen
Copy link
Author

This not work:

I write this to a mp3 fil, and try to view it.

$TagData["text"][0]["data"] ="Test";
$TagData["text"][0]["description"] ="arranger";

$TagData["text"][1]["data"] ="Test";
$TagData["text"][1]["description"] ="rating";

$TagData["text"][2]["data"] ="Test";
$TagData["text"][2]["description"] ="type";

$TagData["text"][3]["data"] ="Test";
$TagData["text"][3]["description"] ="dansktitel";

Only the "arranger" tag is taken with in "comment" - because of the value check. Here I think check of "Key/description" is the right to prevent adding duplicate

If the "data" value is differens it works.

@JamesHeinrich
Copy link
Owner

If you can supply a test file like this (either post a link here or email to [email protected]) that would help me in testing a solution.

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

No branches or pull requests

3 participants