Skip to content

Commit 59c706e

Browse files
committed
Fix warnings in PHP 8.1
1 parent 8cef8c0 commit 59c706e

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

phpstan-baseline.neon

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5636,7 +5636,7 @@ parameters:
56365636
path: src/PhpSpreadsheet/Writer/Xlsx/Chart.php
56375637

56385638
-
5639-
message: "#^Parameter \\#1 \\$rawTextData of method PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\XMLWriter\\:\\:writeRawData\\(\\) expects array\\<string\\>\\|string, int given\\.$#"
5639+
message: "#^Parameter \\#1 \\$rawTextData of method PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\XMLWriter\\:\\:writeRawData\\(\\) expects array\\<string\\>\\|string\\|null, int given\\.$#"
56405640
count: 1
56415641
path: src/PhpSpreadsheet/Writer/Xlsx/Chart.php
56425642

src/PhpSpreadsheet/Shared/XMLWriter.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ public function getData()
7777
/**
7878
* Wrapper method for writeRaw.
7979
*
80-
* @param string|string[] $rawTextData
80+
* @param null|string|string[] $rawTextData
8181
*
8282
* @return bool
8383
*/
@@ -87,6 +87,6 @@ public function writeRawData($rawTextData)
8787
$rawTextData = implode("\n", $rawTextData);
8888
}
8989

90-
return $this->writeRaw(htmlspecialchars($rawTextData));
90+
return $this->writeRaw(htmlspecialchars($rawTextData ?? ''));
9191
}
9292
}

0 commit comments

Comments
 (0)