Skip to content

Commit 1317084

Browse files
authored
Correct Very Minor Error / Php8.2 Deprecation (#3021)
When Reader/Xlsx/WorkbookView was split off from Reader/Xlsx.php, one statement accidentally brought `!empty($this->loadSheetsOnly)` with it. That property does not exist in WorkbookView, so the test is useless (it is always empty); and, in fact, the caller passes its own version of loadSheetsOnly as a parameter, so it isn't needed even it did exist. In Php8.2, this might be a deprecation, although it hasn't shown up in the GitHub 8.2 tests. Fix it anyhow.
1 parent 3861f7e commit 1317084

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/PhpSpreadsheet/Reader/Xlsx/WorkbookView.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public function viewSettings(SimpleXMLElement $xmlWorkbook, $mainNS, array $mapS
2929
$this->spreadsheet->setActiveSheetIndex(0);
3030

3131
$workbookView = $xmlWorkbook->children($mainNS)->bookViews->workbookView;
32-
if (($readDataOnly !== true || !empty($this->loadSheetsOnly)) && !empty($workbookView)) {
32+
if ($readDataOnly !== true && !empty($workbookView)) {
3333
$workbookViewAttributes = self::testSimpleXml(self::getAttributes($workbookView));
3434
// active sheet index
3535
$activeTab = (int) $workbookViewAttributes->activeTab; // refers to old sheet index

0 commit comments

Comments
 (0)