Skip to content

Commit

Permalink
fix: Improve PHP 8.2 compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
mitelg committed Dec 7, 2023
1 parent 40792cf commit 10b0847
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Components/DbAdapters/ProductsDbAdapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -263,8 +263,8 @@ public function read(array $ids, array $columns): array
$record['regulationPrice'] = \round($record['regulationPrice'] * (100 + $record['tax']) / 100, 2);
}
} else {
$record['price'] = \round($record['price'], 2);
$record['pseudoPrice'] = \round($record['pseudoPrice'], 2);
$record['price'] = \round($record['price'] ?? 0, 2);
$record['pseudoPrice'] = \round($record['pseudoPrice'] ?? 0, 2);
if (SwagVersionHelper::isShopware578() && isset($record['regulationPrice'])) {
$record['regulationPrice'] = round($record['regulationPrice'], 2);
}
Expand Down
4 changes: 2 additions & 2 deletions Components/DbAdapters/ProductsPricesDbAdapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -206,8 +206,8 @@ public function read(array $ids, array $columns): array
$record['regulationPrice'] = \round($record['regulationPrice'] * (100 + $record['tax']) / 100, 2);
}
} else {
$record['price'] = \round($record['price'], 2);
$record['pseudoPrice'] = \round($record['pseudoPrice'], 2);
$record['price'] = \round($record['price'] ?? 0, 2);
$record['pseudoPrice'] = \round($record['pseudoPrice'] ?? 0, 2);
if (SwagVersionHelper::isShopware578() && isset($record['regulationPrice'])) {
$record['regulationPrice'] = \round($record['regulationPrice'], 2);
}
Expand Down
5 changes: 5 additions & 0 deletions plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@
<description lang="de">Das Importieren und Exportieren von Artikeln, Kunden oder Kategorien gehört zum Alltag vieler Shopbetreiber: Schnell lassen sich so Lagerbestände aktualisieren, Preise anpassen oder Erstimporte vornehmen.</description>
<description lang="en">Importing and exporting product and customer data, categories as well as product images is a standard task of any shop owner. Keeping that in mind, Shopware wants to make it as easy as possible for you to quickly edit inventory, prices or even perform a customized import.</description>

<changelog version="4.1.3">
<changes lang="de">PHP 8.2 Kompatibilität verbessert;</changes>
<changes lang="en">Improve PHP 8.2 compatibility;</changes>
</changelog>

<changelog version="4.1.2">
<changes lang="de">PT-12973 - Verbessert das Schreiben der Log-Datei bei Produktbilderimporten;</changes>
<changes lang="en">PT-12973 - Improve writing of log file during product image imports;</changes>
Expand Down

0 comments on commit 10b0847

Please sign in to comment.