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

error: "ID3v2 TXXX data is not properly structured" when TXXX contains a string #230

Open
qippur opened this issue Jan 15, 2020 · 0 comments

Comments

@qippur
Copy link

qippur commented Jan 15, 2020

In case TXXX field contains a string like:
TXXX (User defined text information): (Acoustid Id): 798f47ea-e816-4d90-a1a0-8032ea025268
write function throws an error:
"ID3v2 TXXX data is not properly structured"

Proposal: add string check - from line 633.

                case 'TXXX':
                    foreach ($valuearray as $key => $txxx_data_array) {
                        if (is_string($txxx_data_array)) {
                            $tag_data_id3v2['TXXX'][$key] = $txxx_data_array;
                        } elseif (isset($txxx_data_array['description']) && isset($txxx_data_array['data'])) {
                            $tag_data_id3v2['TXXX'][] = $txxx_data_array;
                            } else {
                                $this->errors[] = 'ID3v2 TXXX data is not properly structured';
                                return false;
                            }
                        }
                    }
                    break;
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

2 participants