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] Metadata values should be of type array, but are string #1308

Open
beatrycze-volk opened this issue Aug 16, 2024 · 0 comments · May be fixed by #1339
Open

[BUG] Metadata values should be of type array, but are string #1308

beatrycze-volk opened this issue Aug 16, 2024 · 0 comments · May be fixed by #1339
Assignees
Labels
🐛 bug A non-security related bug.

Comments

@beatrycze-volk
Copy link
Collaborator

Description

The value passed to the foreach loop is a string, but should be an array.

Reproduction

Steps to reproduce the behaviour:

  1. Install TYPO3 11.x with PHP 8.x
    Click on link to display document page e.g. https://dfgviewer-dist.ddev.site
    See error

Expected Behavior

The values should be stored as arrays or their usage should be adjusted to handle the strings. But the first option is more advisable as imploding and next exploding the array looks like not the most appropriate approach.

Screenshots and Examples

langerror

Environment

  • RDBMS version: MariaDB 10.3
  • TYPO3 version: 11.5.37
  • PHP version: 8.2

Additional Context

This line introduces value type change:

    $metadata[$i][$name] = is_array($value)
        ? implode($this->settings['separator'], $value)
        : $value;

But usages of those values are not adjusted e.g:

    foreach ($metadata[$i][$name] as &$langValue) {
        $langValue = Helper::getLanguageName($langValue);
    }
@sebastian-meyer sebastian-meyer added the 🐛 bug A non-security related bug. label Aug 19, 2024
@sebastian-meyer sebastian-meyer changed the title [BUG] Recent adjustment of musical sources changes values stored in metadata array but not their usage [BUG] Metadata values should be of type array, but are string Aug 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug A non-security related bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants