Skip to content

Use getFromName instead of getFromIndex and locateName#268

Closed
anton-harvey wants to merge 1 commit intoPHPOffice:developfrom
anton-harvey:develop
Closed

Use getFromName instead of getFromIndex and locateName#268
anton-harvey wants to merge 1 commit intoPHPOffice:developfrom
anton-harvey:develop

Conversation

@anton-harvey
Copy link
Contributor

This is:

  • a bugfix
  • a new feature

Checklist:

What does it change?

Fixes #262. Let me know if you need me to check more of the above boxes.

@PowerKiKi PowerKiKi closed this in f7518da Nov 2, 2017
@PowerKiKi
Copy link
Member

Thanks ! I reworded the commit message to explain why, rather that what, and added a line to the changelog.

Dfred pushed a commit to Dfred/PhpSpreadsheet that referenced this pull request Nov 20, 2018
Previously the function did not check whether the return value of `ZipArchive::locateName`
was `false`. And when it was, it was passed straight into `ZipArchive::getFromIndex`,
which casts it to an integer, resulting in it incorrectly retrieving the entry at index `0`.

Fixes PHPOffice#262
Closes PHPOffice#268
BlackyTay pushed a commit to BlackyTay/PhpSpreadsheet that referenced this pull request Aug 8, 2025
Previously the function did not check whether the return value of `ZipArchive::locateName`
was `false`. And when it was, it was passed straight into `ZipArchive::getFromIndex`,
which casts it to an integer, resulting in it incorrectly retrieving the entry at index `0`.

Fixes PHPOffice#262
Closes PHPOffice#268
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.

2 participants