Release 6.5.2
Release Notes
Changes in EnderecoService.php
Bug Fix: Improved handling of HTTP_REFERER for backend requests
Issue:
In requests triggered from the backend, attempts to access $_SERVER['HTTP_REFERER']
could result in PHP warnings when the key doesn't exist.
Impact:
These warnings were being treated as errors by Symfony's error handler (starting from Shopware 6.6.4.0 and Symfony 7.1), leading to excessive error logging and decreased perceived product quality.
Solution:
Updated the code to use the null coalescing operator (??
) instead of the ternary operator (?:
) when setting the X-Transaction-Referer
header.
Benefits:
- Eliminates PHP warnings when
HTTP_REFERER
is not set. - Reduces unnecessary error logs in Shopware 6.6.4.0 and later versions.
- Improves the overall stability and perceived quality of the product.
- Adheres to modern PHP best practices for null checking.