Fixed method call (setRevisionPassword -> setRevisionsPassword)

Fixes #553
This commit is contained in:
Mewes Kochheim 2018-06-17 19:46:51 +02:00 committed by Adrien Crivelli
parent aa5b0d0236
commit a6bb491539
No known key found for this signature in database
GPG Key ID: B182FD79DC6DE92E
2 changed files with 7 additions and 1 deletions

View File

@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/) The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/). and this project adheres to [Semantic Versioning](http://semver.org/).
## [Unreleased]
### Fixed
- Xlsx reader crashed when reading a file with workbook protection - [#553](https://github.com/PHPOffice/PhpSpreadsheet/pull/553)
## [1.3.1] - 2018-06-12 ## [1.3.1] - 2018-06-12
### Fixed ### Fixed

View File

@ -2404,7 +2404,7 @@ class Xlsx extends BaseReader
} }
if ($xmlWorkbook->workbookProtection['revisionsPassword']) { if ($xmlWorkbook->workbookProtection['revisionsPassword']) {
$excel->getSecurity()->setRevisionPassword((string) $xmlWorkbook->workbookProtection['revisionsPassword'], true); $excel->getSecurity()->setRevisionsPassword((string) $xmlWorkbook->workbookProtection['revisionsPassword'], true);
} }
if ($xmlWorkbook->workbookProtection['workbookPassword']) { if ($xmlWorkbook->workbookProtection['workbookPassword']) {