Log in

View Full Version : [solved] clean type for an array


sabret00the
12-01-2005, 09:13 PM
it wouldn't be a type_boo, type_int or type_str so what does an array come under?

turned out to be type_array :o

Marco van Herwaarden
12-01-2005, 10:18 PM
TYPE_ARRAY

There are also combined types, applying a type on the values of the array.

sabret00the
12-01-2005, 10:25 PM
thanks marco :)

merk
12-01-2005, 10:43 PM
There are also combined types, applying a type on the values of the array.

Im yet to actually see the section of code that deals with TYPE_ARRAY_*, do you know where it is? because I dont :( (looked again and found clean_array() but is not called inside the input class :disappointed:

sabret00the
12-01-2005, 10:48 PM
Im yet to actually see the section of code that deals with TYPE_ARRAY_*, do you know where it is? because I dont :( (looked again and found clean_array() but is not called inside the input class :disappointed:

file: includes/class_core.php
line: 1290+

merk
12-01-2005, 10:49 PM
file: includes/class_core.php
line: 1290+

Just because constants are defined doesnt mean the input cleaner knows about them, they are not used inside vB_Input_Cleaner.

sabret00the
12-01-2005, 10:52 PM
Just because constants are defined doesnt mean the input cleaner knows about them, they are not used inside vB_Input_Cleaner.

i'm sure i scrolled down and found a shit load of switches dealing with them, oh well guess not, sorry for wasting your time dude :o

merk
12-01-2005, 11:14 PM
Not a worry, I worked it out after reading your post anyway ;)


else
{
$vartype -= TYPE_CONVERT_SINGLE;
}

foreach (array_keys($var) AS $key)
{
$this->do_clean($var["$key"], $vartype);
}

I didnt realise the array types were identical (just +100) to the single types.