Merge branch 'bugfix/fix-php7-issue' into 'master'

Bugfix/fix php7 issue

See merge request fronk/thetool!507
This commit is contained in:
Luca Haid
2024-07-24 15:07:47 +00:00

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;