-
- Downloads
fix(phpstan): address issues with product price calculation and caching
This commit addresses two issues in the product model and utilities. 1) In the product model, changes are made to ensure that the cacheName variable is given a default value of false and is later checked to be not false in the if condition. This ensures that we don't end up writing null data to the cache. 2) Changes are made in the getPriceFieldForProduct function to fix some potential issues with price calculations. Minor refactor includes: - Added a check to ensure the getOption method exists before calling it, to prevent potential fatal errors. - Defaulted currencyPrices to an empty array to prevent potential PHP warnings when trying to access array keys on a null value. - Updated the return statement new QUI\\ERP\\Money\\Price to exclude currencyPrices which was causing issues.
Übergeordneter
40f63f66
Keine zugehörigen Branchen gefunden
Keine zugehörigen Tags gefunden
Überprüfen des Pipeline-Status
Lade
Bitte registrieren oder Anmelden zum Kommentieren