diff --git a/fuel/modules/fuel/assets/js/fuel/controller/BaseFuelController.js b/fuel/modules/fuel/assets/js/fuel/controller/BaseFuelController.js index 29ff7e8fa..c84c977da 100755 --- a/fuel/modules/fuel/assets/js/fuel/controller/BaseFuelController.js +++ b/fuel/modules/fuel/assets/js/fuel/controller/BaseFuelController.js @@ -444,7 +444,7 @@ fuel.controller.BaseFuelController = jqx.lib.BaseController.extend({ $modal.find('iframe#replace_iframe').bind('load', function(){ var iframeContext = this.contentDocument; - var replacedId = $('#new_fuel_replace_id', iframeContext).val(); + var replacedId = parseInt($('#new_fuel_replace_id', iframeContext).val()); $('#form', iframeContext).submit(function(){ if (confirm(fuel.lang('replace_warning'))){ diff --git a/fuel/modules/fuel/config/fuel_constants.php b/fuel/modules/fuel/config/fuel_constants.php index dd0bba9b4..182645708 100644 --- a/fuel/modules/fuel/config/fuel_constants.php +++ b/fuel/modules/fuel/config/fuel_constants.php @@ -1,6 +1,6 @@ input->post('fuel_replace_id'); + $replace_id = (int) $this->input->post('fuel_replace_id', true); //$delete = is_true_val($this->input->post('fuel_delete_replacement')); $delete = TRUE; if (!$this->model->replace($replace_id, $id, $delete)) @@ -1833,7 +1833,7 @@ function replace($id = NULL) if ($success) { - $fields['new_fuel_replace_id'] = array('type' => 'hidden', 'value' => $replace_id); + $fields['new_fuel_replace_id'] = array('type' => 'hidden', 'value' => (int) $replace_id); } //$this->form_builder->use_form_tag = FALSE;