I'm using Magento 1.7.0.2
How can I delete store view by id programmatically?
If you look at the Mage/Adminhtml/controllers/System/StoreController.php file there is the deleteStorePostAction(), the following code is used (just like every other Magento model can delete a record):
$model = Mage::getModel('core/store')->load($itemId);
$model->delete();
Fatal error: Call to a member function getFrontNameByRoute() on a non-object in public_html/includes/src/__default.php on line 17507