Skip to content

Conversation

@oleibman
Copy link
Collaborator

Fix #4099. Ods Reader was expecting there to always be header-style and footer-style tags when page-layout tag is present, but these need not exist. It seemed like there might be other exposures along this line in readPageSettingStyles; rather than waiting for a problem report to show up for each, the code is updated to use ->item(0) in place of [0] when appropriate, and make use of the nullsafe ?-> operator introduced with Php8.

This is:

  • a bugfix
  • a new feature
  • refactoring
  • additional unit tests

Checklist:

  • Changes are covered by unit tests
    • Changes are covered by existing unit tests
    • New unit tests have been added
  • Code style is respected
  • Commit message explains why the change is made (see https://github.com/erlang/otp/wiki/Writing-good-commit-messages)
  • CHANGELOG.md contains a short summary of the change and a link to the pull request if applicable
  • Documentation is updated as necessary

Why this change is needed?

Provide an explanation of why this change is needed, with links to any Issues (if appropriate).
If this is a bugfix or a new feature, and there are no existing Issues, then please also create an issue that will make it easier to track progress with this PR.

oleibman added 3 commits July 18, 2024 13:30
Fix PHPOffice#4099. Ods Reader was expecting there to always be `header-style` and `footer-style` tags when `page-layout` tag is present, but these need not exist. It seemed like there might be other exposures along this line in `readPageSettingStyles`; rather than waiting for a problem report to show up for each, the code is updated to use `->item(0)` in place of `[0]` when appropriate, and make use of the nullsafe `?->` operator introduced with Php8.
@oleibman oleibman enabled auto-merge July 27, 2024 14:48
@oleibman oleibman added this pull request to the merge queue Jul 27, 2024
Merged via the queue into PHPOffice:master with commit b43947f Jul 27, 2024
@oleibman oleibman deleted the issue4099 branch July 27, 2024 15:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Check if $header and $footer are not null

1 participant