JamesHeinrich / getID3

http://www.getid3.org/
Other
1.14k stars 244 forks source link

Errors #333

Open Brian-Schultz opened 3 years ago

Brian-Schultz commented 3 years ago

I'm trying to write some ETCO tags to an mp3, and I'm getting the following errors:

PHP Notice:  Array to string conversion in /home/brian/getID3/getid3/write.id3v2.php on line 2017
PHP Warning:  Invalid argument supplied for foreach() in /home/brian/getID3/getid3/write.id3v2.php on line 1648
PHP Warning:  Invalid argument supplied for foreach() in /home/brian/getID3/getid3/write.id3v2.php on line 1648
PHP Warning:  Invalid argument supplied for foreach() in /home/brian/getID3/getid3/write.id3v2.php on line 1648
PHP Warning:  Invalid argument supplied for foreach() in /home/brian/getID3/getid3/write.id3v2.php on line 1648
PHP Warning:  Invalid argument supplied for foreach() in /home/brian/getID3/getid3/write.id3v2.php on line 1648

Any ideas on what I'm doing wrong?

Brian-Schultz commented 3 years ago

I fixed this part, but what is the correct way to write ETCO tags?

I've tried probably 100 ways to do it...and none of them work.

Here's the latest try:

$TagData['id3v2']['ETCO'][0]['typeid'] = '03'; $TagData['id3v2']['ETCO'][0]['type'] = '03'; $TagData['id3v2']['ETCO'][0]['timestamp'] = '1000'; $TagData['id3v2']['ETCO'][0]['timestampformat'] = '02';

$TagData['id3v2']['ETCO'][0]['typeid'] = '04'; $TagData['id3v2']['ETCO'][0]['type'] = '04'; $TagData['id3v2']['ETCO'][0]['timestamp'] = '1500'; $TagData['id3v2']['ETCO'][0]['timestampformat'] = '02';

This obviously isn't correct. What is the correct way?

Thanks!