Bugfix for broken "$remove_other_tags"

Think you found a bug in getID3()? Post here with details.
Post Reply
dawnbreak
User
Posts: 5
Joined: Fri Jul 18, 2003 2:33 pm
Location: D -> NRW -> BN

Bugfix for broken "$remove_other_tags"

Post by dawnbreak » Sun Jul 11, 2004 8:57 pm

Heihei,

Fixing against getid3() v1.7.0-hotfix in write.php.

The following problem:
If you set $remove_other_tags = true and not writing an id3v2 tag you get the following error message:
"unknown tag format "id3v2" in $tagformats in WriteTags()"
Reason:
In line 137 you set: $TagFormatsToRemove[] = 'id3v2'; only if $remove_other_tags is set true.
line 150:
$WritingFilesToInclude = array_merge($this->tagformats, $TagFormatsToRemove);
$TagFormatsToRemove is merged with $this->tagformats, so "id3v2" will be checked for an include file, but it is not catched, so that the default will throw an error.

Solution:
In line 171 you just need to add [php]case 'id3v2';[/php] ;))
I hope that's all and not bringing something else in doubt.

Regards,
Klaus[/code]

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests