Skip to content

Instantly share code, notes, and snippets.

diff --git a/app/addons/rus_sdek/Tygh/Shippings/Services/Sdek.php b/app/addons/rus_sdek/Tygh/Shippings/Services/Sdek.php
index 6a4668e60d..abe101f7e5 100644
--- a/app/addons/rus_sdek/Tygh/Shippings/Services/Sdek.php
+++ b/app/addons/rus_sdek/Tygh/Shippings/Services/Sdek.php
@@ -207,15 +207,11 @@ class Sdek implements IService, IPickupService
$weight_data = fn_convert_weight_to_imperial_units($this->shipping_info['package_info']['W']);
$shipping_settings = $this->shipping_info['service_params'];
- $weight_kg = $weight_data['plain'] * $symbol_grams / 1000;
+ $weight = $weight_data['plain'] * $symbol_grams;
diff --git a/app/addons/rus_sdek/Tygh/Shippings/Services/Sdek.php b/app/addons/rus_sdek/Tygh/Shippings/Services/Sdek.php
index fd551b9079..6a4668e60d 100644
--- a/app/addons/rus_sdek/Tygh/Shippings/Services/Sdek.php
+++ b/app/addons/rus_sdek/Tygh/Shippings/Services/Sdek.php
@@ -15,6 +15,7 @@
namespace Tygh\Shippings\Services;
use Tygh\Enum\Addons\RusSdek\DeliveryPointType;
+use Tygh\Enum\YesNo;
use Tygh\Tygh;
diff --git a/app/Tygh/UpgradeCenter/Connectors/BaseConnector.php b/app/Tygh/UpgradeCenter/Connectors/BaseConnector.php
index 5a7862df84..25bc9e9ac6 100644
--- a/app/Tygh/UpgradeCenter/Connectors/BaseConnector.php
+++ b/app/Tygh/UpgradeCenter/Connectors/BaseConnector.php
@@ -177,7 +177,9 @@ abstract class BaseConnector implements IConnector
. '/index.php?dispatch=product_updates.get_package&package_id=' . $schema['package_id']
. '&edition=' . $this->product_edition
. '&license_number=' . $this->license_number
- . '&product_build=' . $this->product_build
+ . '&product_build=' . $this->product_build,
diff --git a/app/functions/fn.cart.php b/app/functions/fn.cart.php
index 214e2966bc..3dac411f66 100644
--- a/app/functions/fn.cart.php
+++ b/app/functions/fn.cart.php
@@ -178,6 +178,7 @@ function fn_get_cart_product_data($hash, &$product, $skip_promotion, &$cart, &$a
)
) {
fn_delete_cart_product($cart, $hash);
+ $cart['save_cart_content'] = true;
diff --git a/app/functions/fn.cart.php b/app/functions/fn.cart.php
index 214e2966bc..3dac411f66 100644
--- a/app/functions/fn.cart.php
+++ b/app/functions/fn.cart.php
@@ -178,6 +178,7 @@ function fn_get_cart_product_data($hash, &$product, $skip_promotion, &$cart, &$a
)
) {
fn_delete_cart_product($cart, $hash);
+ $cart['save_cart_content'] = true;
diff --git a/_tools/codestyle/Psalm/baseline.xml b/_tools/codestyle/Psalm/baseline.xml
index 470e1587e3..82ba10b40b 100644
--- a/_tools/codestyle/Psalm/baseline.xml
+++ b/_tools/codestyle/Psalm/baseline.xml
@@ -30349,7 +30349,8 @@
<code>(int) $payment_id</code>
<code>(int) $payment_id</code>
</RedundantCastGivenDocblockType>
- <ReferenceConstraintViolation occurrences="2">
+ <ReferenceConstraintViolation occurrences="3">
diff --git a/app/addons/tilda_pages/func.php b/app/addons/tilda_pages/func.php
index f8bce00a28..5d9a73cc3b 100644
--- a/app/addons/tilda_pages/func.php
+++ b/app/addons/tilda_pages/func.php
@@ -350,9 +350,14 @@ function fn_tilda_pages_merge_css($page_id, array $css_list)
try {
$css_content = implode("\n\n", $contents);
+ //Prevent compile CSS calc() properties
+ $css_content = preg_replace('/calc\(([^)(]*(?:\([^)(]*(?:\([^)(]*\)[^)(]*)*\)[^)(]*)*)\)/', 'calc(~"$1")', $css_content);
diff --git a/app/addons/tilda_pages/func.php b/app/addons/tilda_pages/func.php
index f8bce00a28..5d9a73cc3b 100644
--- a/app/addons/tilda_pages/func.php
+++ b/app/addons/tilda_pages/func.php
@@ -350,9 +350,14 @@ function fn_tilda_pages_merge_css($page_id, array $css_list)
try {
$css_content = implode("\n\n", $contents);
+ //Prevent compile CSS calc() properties
+ $css_content = preg_replace('/calc\(([^)(]*(?:\([^)(]*(?:\([^)(]*\)[^)(]*)*\)[^)(]*)*)\)/', 'calc(~"$1")', $css_content);
diff --git a/app/addons/tilda_pages/func.php b/app/addons/tilda_pages/func.php
index f8bce00a28..5d9a73cc3b 100644
--- a/app/addons/tilda_pages/func.php
+++ b/app/addons/tilda_pages/func.php
@@ -350,9 +350,14 @@ function fn_tilda_pages_merge_css($page_id, array $css_list)
try {
$css_content = implode("\n\n", $contents);
+ //Prevent compile CSS calc() properties
+ $css_content = preg_replace('/calc\(([^)(]*(?:\([^)(]*(?:\([^)(]*\)[^)(]*)*\)[^)(]*)*)\)/', 'calc(~"$1")', $css_content);
diff --git a/app/addons/paypal_checkout/Tygh/Addons/PaypalCheckout/Payments/PaypalCheckout.php b/app/addons/paypal_checkout/Tygh/Addons/PaypalCheckout/Payments/PaypalCheckout.php
index 47ad64c900..adaff7847a 100644
--- a/app/addons/paypal_checkout/Tygh/Addons/PaypalCheckout/Payments/PaypalCheckout.php
+++ b/app/addons/paypal_checkout/Tygh/Addons/PaypalCheckout/Payments/PaypalCheckout.php
@@ -185,7 +185,7 @@ class PaypalCheckout
*
* @return array<string, string> Payment processor response
*
- * @psalm-return array{'paypal_checkout.order_id': string, order_status: string, reason_text: string}
+ * @psalm-return array{"paypal_checkout.order_id": string, order_status: string, reason_text: string}