<commit_before><?php
class MenuItemsController extends AppController {
    
    function delete($id) {
        $this->MenuItem->recursive = -1;
        $this->MenuItem->id = $id;
        $item = $this->MenuItem->read();
        if (!empty($item)) {
            $this->MenuItem->del($id);
        }
        $this->redirect(array('controller' => 'menus', 'action' => 'edit', $item['MenuItem']['menu_id']));
    }
    
}<commit_msg>Fixed menu item delete. Bug found by Mr TeckniX<commit_after><?php
class MenuItemsController extends AppController {
    
    function admin_delete($id) {
        $this->MenuItem->recursive = -1;
        $this->MenuItem->id = $id;
        $item = $this->MenuItem->read();
        if (!empty($item)) {
            $this->MenuItem->del($id);
        }
        $this->redirect(array('controller' => 'menus', 'action' => 'edit', $item['MenuItem']['menu_id']));
    }
    
}
{'fraction_non_alphanumeric': 0.19265033407572382, 'fraction_numerical': 0.0022271714922048997, 'mean_word_length': 2.625, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 25, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6031021', 'n_tokens_mistral': 273, 'n_tokens_neox': 271, 'n_words': 50}