Welcome Guest, Not a member yet? Register   Sign In
Issue in Updating CI 2.2.1 to 3.1.13
#1

My CodeIgniter application is quite outdated, so I'm trying to update it to the latest possible version. I'm encountering the following issues:
  • For multidimensional forms, it now requires `[]`. The problem is that my system is quite large. Do I really have to change this throughout the entire system?
  • Previously, callback functions accepted multidimensional fields coming from the form post, but now they are receiving null. Here's an example:

PHP Code:
public function index()
{
    $this->load->library('form_validation');
  
    $this
->form_validation->set_rules('skills[]''skill''callback_skills_check');
  
    
if ($this->form_validation->run() == FALSE)
    {
        $this->load->view('my_form');
    }
    else
    {
        $this->load->view('formsuccess');
    }
}

public function 
skills_check($arraySkills)
{
    if (in_array('Strength'$arraySkills)) {
        $this->form_validation->set_message('skills_check''The field {field} must contain the word "Strength"');
        return FALSE;
    } else {
        return TRUE;
    }



Is there any way to minimize these problems so I can use the most current version?
Reply




Theme © iAndrew 2016 - Forum software by © MyBB