• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Fatal error: Call to undefined method CI_Input::xss_clean()

#1
[eluser]James Star[/eluser]
Hello,

I am doing an upgrade from 1.7.x to 2.x.

And I have some code that is pointing to the xss_clean method in Input Class.

Here is the code: $this->input->xss_clean($cleanthis);

And I am retrieving this error: Fatal error: Call to undefined method CI_Input::xss_clean() in ...

I also can't seem to find where the Input class might have been loaded in the previous version, and I tried to do a manual load above the code: $this->load->library('input'). But I still get the same error.

Anyone got any ideas?


#2
[eluser]NeoArc[/eluser]
They moved the function.

$login = $this->security->xss_clean($login)

#3
[eluser]James Star[/eluser]
Okay, very interesting.

We also found out we can do this - $this->input->post('postitem', TRUE);

See URL: http://ellislab.com/codeigniter/user-gui...input.html

Which way is better? Do they both do the same thing?

Thank you.

#4
[eluser]NeoArc[/eluser]
It depends on how the value is obtained (POST, database, text file,..).
They do the same thing.

#5
[eluser]James Star[/eluser]
post.


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.