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] Access to non-existent MetsDocument property #1301

Open
beatrycze-volk opened this issue Aug 15, 2024 · 0 comments
Open

[BUG] Access to non-existent MetsDocument property #1301

beatrycze-volk opened this issue Aug 15, 2024 · 0 comments
Assignees
Labels
🐛 bug A non-security related bug.

Comments

@beatrycze-volk
Copy link
Collaborator

Description

Using the nonexistent MetsDocument property inside the loops. musicalStructureInfo is always null, as it was never defined nor assigned in the class.

This problem appears in few places:

DocumentAnnotation class - foreach ($this->document->getCurrentDocument()->musicalStructureInfo as $key => $musicalInfo)

NavigationController class - $measureOptions[$i] = '[' . $i . ']' . ($this->document->getCurrentDocument()->musicalStructureInfo[$this->document->getCurrentDocument()->musicalStructure[$i]['measureid']]['orderlabel'] ? ' - ' . htmlspecialchars($this->document->getCurrentDocument()->musicalStructureInfo[$this->document->getCurrentDocument()->musicalStructureInfo[$i]]['orderlabel']) : '')

PageViewController class - $musicalStruct = $doc->musicalStructureInfo; -> foreach ($musicalStruct as $measureData)

Reproduction

Steps to reproduce the behaviour:

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

Expected Behavior

The class parameters should be declared and assigned before the usage.

Screenshots and Examples

propertyerror

Environment

  • RDBMS version: MariaDB 10.3
  • TYPO3 version: 11.5.37
  • PHP version: 8.2
@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 iterates over non-existing variable [BUG] Access to non-existent MetsDocument property 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

No branches or pull requests

3 participants