Change default value of a function parameter

0

I am migrating a system made in Codeigniter from version 2 to version 3, I have already done a lot of steps that the manual says but one of them I have with a doubt, the step 11 , because it says that some functions that made the xss filter have now changed the default, now having to pass a second value to TRUE when you want it that post, for example, is filtered.

But I'm already doing the following, I created a MY_Input file that extended from Input and rewrote these functions, like get, post and get_post, but I do not know the correct way to do this rewrite, if so: / p>

public function get($index = NULL, $xss_clean = TRUE)
{
    return parent::get($index, $xss_clean);
}

or so:

public function get($index = NULL, $xss_clean = TRUE)
{
    return $this->_fetch_from_array($_GET, $index, $xss_clean);
}

Or do you have any other more correct way to do this?

    
asked by anonymous 17.01.2018 / 17:27

1 answer

0

Codeigniter has deprecated the use of the massive xss filter and automatically. To do this you must filter each input separately, like this:

 $this->input->post('meuInput',TRUE)
    
17.01.2018 / 17:31