Part of the EllisLab Network
   
 
Input::_sanitize_globals ??
Posted: 21 January 2007 09:50 PM   [ Ignore ]  
Summer Student
Total Posts:  4
Joined  01-14-2007

I was going over the Input class to understand how it works. And, it seems to be doing the following:

foreach($_POST as $key => $val) {                
  $_POST[$this
->_clean_input_keys($key)] = $this->_clean_input_data($val);
}

But, this does not remove cleaned items, and keep adding stuff to the _POST array???? Is it not supposed to remove the old values, i.e. something like this:

$newPost = array();
foreach(
$_POST as $key => $val) {
  $newPost[$this
->_clean_input_keys($key)] = $this->_clean_input_data($val);
}
$_POST
= $newPost;

Same goes for the cookies, any suggestions?

Profile
 
 
Posted: 22 January 2007 07:37 AM   [ Ignore ]   [ # 1 ]  
Lab Assistant
RankRank
Total Posts:  144
Joined  09-08-2006

lol smile

whats going to happen if you supply the same key thats already in the array…

Profile
 
 
Posted: 22 January 2007 08:17 AM   [ Ignore ]   [ # 2 ]  
Lab Assistant
RankRank
Total Posts:  294
Joined  10-17-2006

It only puts in a new key when the old one was not clean right. You’re right to say it should remove the old, not clean keys.

Profile
 
 
   
 
 
Post Marker Legend
New Topic New posts Hot Topic Hot Topic with new posts New Poll New Poll Moved Topic Moved Topic Sticky Topic Sticky topic
Old Topic No new posts Hot Old Topic Hot Topic with no new posts Old Poll Old Poll Closed Topic Closed Topic Announcement Announcements
Theme
Change Theme
Visitor Statistics
The most visitors ever was 719, on June 06, 2008 10:16 AM
Total Registered Members: 64453 Total Logged-in Users: 19
Total Topics: 80961 Total Anonymous Users: 0
Total Replies: 435696 Total Guests: 189
Total Posts: 516657    
Members ( View Memberlist )
Active Members:    carmynColinHoernigCrucialDark Preacherglemighhjuehuglelittle brittlelmv4321mantisMMCCQQparrotspregoolpsiborgRick Jollysharpethanhnctthurtingtoro