Skip to content

Commit

Permalink
Adding object service Mage_Core_Model_Store in Resource/Url::clearDis…
Browse files Browse the repository at this point in the history
…abledCategory function
  • Loading branch information
MarcinNowakWebdeveloper authored and tmotyl committed Jun 6, 2022
1 parent a666d1b commit c851202
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion app/code/core/Mage/Catalog/Model/Resource/Url.php
Original file line number Diff line number Diff line change
Expand Up @@ -1114,7 +1114,7 @@ public function clearRewrites($storeId)
* catalog/seo/create_url_for_disabled is set as false
*
* @param int $categoryId
* @param int|null $storeId
* @param int|Mage_Core_Model_Store|null $storeId
* @return $this
*/
public function clearDisabledCategory($categoryId, $storeId = null)
Expand All @@ -1129,6 +1129,11 @@ public function clearDisabledCategory($categoryId, $storeId = null)
}
return $this;
}
if ($storeId instanceof Mage_Core_Model_Store) {
$storeId = $storeId->getStoreId();
} elseif (!is_int($storeId)) {
throw new Exception('StoreId must by int or Mage_Core_Model_Store');
}

$adapter = $this->_getWriteAdapter();

Expand Down

0 comments on commit c851202

Please sign in to comment.