diff --git a/gsitemap.php b/gsitemap.php index 000d13e..34d992d 100755 --- a/gsitemap.php +++ b/gsitemap.php @@ -474,8 +474,6 @@ protected function getProductLink(&$link_sitemap, $lang, &$index, &$i, $id_produ ], $image_link) : $image_link; $images_product[] = [ - 'title_img' => htmlspecialchars(strip_tags($product->name)), - 'caption' => htmlspecialchars(strip_tags($product->meta_description)), 'link' => $image_link, ]; } @@ -547,8 +545,6 @@ protected function getCategoryLink(&$link_sitemap, $lang, &$index, &$i, $id_cate ], $image_link) : $image_link; $image_category = [ - 'title_img' => htmlspecialchars(strip_tags($category->name)), - 'caption' => Tools::substr(htmlspecialchars(strip_tags($category->description)), 0, 350), 'link' => $image_link, ]; } @@ -612,8 +608,6 @@ protected function getManufacturerLink(&$link_sitemap, $lang, &$index, &$i, $id_ ], $image_link) : $image_link; $manufacturer_image = [ - 'title_img' => htmlspecialchars(strip_tags($manufacturer->name)), - 'caption' => htmlspecialchars(strip_tags($manufacturer->short_description)), 'link' => $image_link, ]; @@ -820,15 +814,7 @@ protected function recursiveSitemapCreator($link_sitemap, $lang, &$index) $images = array_merge($images, $file['images']); } foreach ($images as $image) { - $this->addSitemapNodeImage($write_fd, htmlspecialchars(strip_tags($image['link'])), isset($image['title_img']) ? htmlspecialchars(str_replace([ - "\r\n", - "\r", - "\n", - ], '', $this->removeControlCharacters(strip_tags($image['title_img'])))) : '', isset($image['caption']) ? htmlspecialchars(str_replace([ - "\r\n", - "\r", - "\n", - ], '', strip_tags($image['caption']))) : ''); + $this->addSitemapNodeImage($write_fd, htmlspecialchars(strip_tags($image['link']))); } fwrite($write_fd, '' . PHP_EOL); } @@ -870,9 +856,9 @@ protected function addSitemapNode($fd, $loc, $priority, $change_freq, $last_mod ); } - protected function addSitemapNodeImage($fd, $link, $title, $caption) + protected function addSitemapNodeImage($fd, $link) { - fwrite($fd, '' . PHP_EOL . '' . (Configuration::get('PS_REWRITING_SETTINGS') ? '' : $link) . '' . PHP_EOL . '' . PHP_EOL . '' . PHP_EOL . '' . PHP_EOL); + fwrite($fd, '' . PHP_EOL . '' . (Configuration::get('PS_REWRITING_SETTINGS') ? '' : $link) . '' . PHP_EOL . '' . PHP_EOL); } /** diff --git a/tests/phpstan/phpstan-1.7.8.neon b/tests/phpstan/phpstan-1.7.8.neon index 006c0ef..d108bda 100644 --- a/tests/phpstan/phpstan-1.7.8.neon +++ b/tests/phpstan/phpstan-1.7.8.neon @@ -4,4 +4,3 @@ includes: parameters: ignoreErrors: - '#Access to an undefined property Cookie\:\:\$id_lang.#' - - '#Parameter \#1 \$str of function strip_tags expects string, array given.#'