From: Tim Düsterhus Date: Fri, 4 Mar 2022 10:59:04 +0000 (+0100) Subject: WBB 4.x: Fix PHP 8.1 compatibility with NULL values in board title / description X-Git-Tag: 5.4.15_dev_1~2 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=2a06705bf94c12ff9f04dcbafbf4015b1379a365;p=GitHub%2FWoltLab%2Fcom.woltlab.wcf.exporter.git WBB 4.x: Fix PHP 8.1 compatibility with NULL values in board title / description > Message: strpos(): Passing null to parameter #1 ($haystack) of type string is > deprecated --- diff --git a/files/lib/system/exporter/WBB4xExporter.class.php b/files/lib/system/exporter/WBB4xExporter.class.php index ce70a0c..1fa5039 100644 --- a/files/lib/system/exporter/WBB4xExporter.class.php +++ b/files/lib/system/exporter/WBB4xExporter.class.php @@ -1180,6 +1180,9 @@ class WBB4xExporter extends AbstractExporter $statement->execute(); $i18nValues = []; while ($row = $statement->fetchArray()) { + $row['title'] = $row['title'] ?? ''; + $row['description'] = $row['description'] ?? ''; + $this->boardCache[$row['parentID']][] = $row; if (\strpos($row['title'], 'wbb.board.board') === 0) {