fix soucis categories urls postcms

This commit is contained in:
Thibault GUILLAUME 2015-11-17 12:59:28 +01:00
parent 6860adc7c1
commit e9df08b863

View File

@ -122,9 +122,11 @@ class SeoUrl extends Module {
$urls = array();
$url_category = ManageSeoUrl::getByType($params['object']->id_category, ManageSeoUrl::TYPE_CATEGORY_CMS, FALSE, NULL, $id_shop);
foreach (Language::getLanguages() as $language) {
$id_lang = (int)$language['id_lang'];
$urls[$id_lang] = $url_category->link_rewrite[$id_lang].$params['object']->id.'-'.$params['object']->slug[$id_lang].'.php';
if (Validate::isLoadedObject($url_category)) {
foreach (Language::getLanguages() as $language) {
$id_lang = (int)$language['id_lang'];
$urls[$id_lang] = $url_category->link_rewrite[$id_lang].$params['object']->id.'-'.$params['object']->slug[$id_lang].'.php';
}
}
if (!$seo_url instanceOf ManageSeoUrl) {