Bugfix/fix php7 issue

This commit is contained in:
Luca Haid
2024-07-24 15:07:46 +00:00
parent 41f8a1b2e6
commit 29c873f145

View File

@@ -60,8 +60,7 @@ class WarehouseArticleController extends TTCrud {
if ($article->cheapestPurchasePrice != $cheapestPurchasePrice) {
try {
WarehouseArticleModel::update([...get_object_vars($article), // Unpack properties into an array
'cheapestPurchasePrice' => $cheapestPurchasePrice]);
WarehouseArticleModel::update(array_merge(get_object_vars($article), ['cheapestPurchasePrice' => $cheapestPurchasePrice]));
} catch (Exception $e) {
print_r($article);
echo PHP_EOL;