From b09d03f46fe2ae4834a71c3bd64a4ed33a96c00a Mon Sep 17 00:00:00 2001
From: RPrudon <108343014+RPrudon@users.noreply.github.com>
Date: Thu, 4 May 2023 14:15:52 +0200
Subject: [PATCH 1/4] Fix error in case of image with null Title or Caption
---
app/code/Magento/Sitemap/Model/Sitemap.php | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/app/code/Magento/Sitemap/Model/Sitemap.php b/app/code/Magento/Sitemap/Model/Sitemap.php
index b88ff704b5807..b1439019f3eb9 100644
--- a/app/code/Magento/Sitemap/Model/Sitemap.php
+++ b/app/code/Magento/Sitemap/Model/Sitemap.php
@@ -576,9 +576,9 @@ protected function _getSitemapRow($url, $lastmod = null, $changefreq = null, $pr
foreach ($images->getCollection() as $image) {
$row .= '';
$row .= '' . $this->_escaper->escapeUrl($image->getUrl()) . '';
- $row .= '' . $this->escapeXmlText($images->getTitle()) . '';
+ $row .= '' . $this->escapeXmlText((string)$images->getTitle()) . '';
if ($image->getCaption()) {
- $row .= '' . $this->escapeXmlText($image->getCaption()) . '';
+ $row .= '' . $this->escapeXmlText((string)$image->getCaption()) . '';
}
$row .= '';
}
From 5c14d7a3bd99b67b65762e04083b05286b9f08a4 Mon Sep 17 00:00:00 2001
From: engcom-Dash
Date: Tue, 22 Oct 2024 14:22:06 +0530
Subject: [PATCH 2/4] 37462: Fix PHPCS warnings
---
app/code/Magento/Sitemap/Model/Sitemap.php | 3 +++
1 file changed, 3 insertions(+)
diff --git a/app/code/Magento/Sitemap/Model/Sitemap.php b/app/code/Magento/Sitemap/Model/Sitemap.php
index b1439019f3eb9..003d3c9717d3a 100644
--- a/app/code/Magento/Sitemap/Model/Sitemap.php
+++ b/app/code/Magento/Sitemap/Model/Sitemap.php
@@ -815,6 +815,7 @@ public function getSitemapUrl($sitemapPath, $sitemapFileName)
* @return bool
* @deprecated 100.1.5 Because the robots.txt file is not generated anymore,
* this method is not needed and will be removed in major release.
+ * @see Nothing
*/
protected function _isEnabledSubmissionRobots()
{
@@ -829,6 +830,8 @@ protected function _isEnabledSubmissionRobots()
* @return void
* @deprecated 100.1.5 Because the robots.txt file is not generated anymore,
* this method is not needed and will be removed in major release.
+ *
+ * @see Nothing
*/
protected function _addSitemapToRobotsTxt($sitemapFileName)
{
From 06547ed08383054cf4ea70484984ecf5c3529e08 Mon Sep 17 00:00:00 2001
From: engcom-Dash
Date: Tue, 22 Oct 2024 14:23:19 +0530
Subject: [PATCH 3/4] 37462: remove extra line
---
app/code/Magento/Sitemap/Model/Sitemap.php | 1 -
1 file changed, 1 deletion(-)
diff --git a/app/code/Magento/Sitemap/Model/Sitemap.php b/app/code/Magento/Sitemap/Model/Sitemap.php
index 003d3c9717d3a..28eeb075ac7c8 100644
--- a/app/code/Magento/Sitemap/Model/Sitemap.php
+++ b/app/code/Magento/Sitemap/Model/Sitemap.php
@@ -830,7 +830,6 @@ protected function _isEnabledSubmissionRobots()
* @return void
* @deprecated 100.1.5 Because the robots.txt file is not generated anymore,
* this method is not needed and will be removed in major release.
- *
* @see Nothing
*/
protected function _addSitemapToRobotsTxt($sitemapFileName)
From dc8e367ada80eabe1529fb694ef0d7537d12612f Mon Sep 17 00:00:00 2001
From: engcom-Dash
Date: Wed, 23 Oct 2024 14:39:03 +0530
Subject: [PATCH 4/4] 37462: Fix static failure related to copyright tag
---
app/code/Magento/Sitemap/Model/Sitemap.php | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/app/code/Magento/Sitemap/Model/Sitemap.php b/app/code/Magento/Sitemap/Model/Sitemap.php
index 28eeb075ac7c8..2fc4319867806 100644
--- a/app/code/Magento/Sitemap/Model/Sitemap.php
+++ b/app/code/Magento/Sitemap/Model/Sitemap.php
@@ -1,7 +1,7 @@