PDA

View Full Version : Using the array types


The Geek
08-27-2005, 12:34 PM
I suppose im doing this all wrong unless its a bug that hasnt popped up yet.

If I post an array like this:

<input type="text" name="box[1]" value="1" />
<input type="text" name="box[2]" value="2" />

And I try to catch and cleanse with:

$vbulletin->input->clean_array_gpc('p', array(
'stuff' => TYPE_STR,
'box' => TYPE_ARRAY_NUM,
);

I get:

Fatal error: Unsupported operand types in xxx\includes\class_core.php on line 1657
Is this a bug or am I doing this totally wrong? (BTW: This is only when there are values in the TYPE_ARRAY_NUM

Thanks! :)

erk. I think I posted this in the wrong forum :(

bad geek BADBADBADBAD

Marco van Herwaarden
08-27-2005, 07:08 PM
Lol, wonder why nobody comes in slapping YOU for posting in the wrong forum ;)

Will move.

I saw you also posted this in the big tracker. :D

Sorry no time now to test this, but it looks ok to me. (Hmm on second thought, people could type in any text in those input fields, also alpha, but you would expect it to be 'cleaned'from that)

Andreas
08-28-2005, 03:46 AM
Marco just said it ... it did it (moving the Thread) :D

1657 of an unmodified RC2 class_core.php?

The Geek
08-28-2005, 06:57 AM
I think people are freaked that large flame threads may get started about 'why my freaking post was moved' :nervous:

Unmodified Kirb - im a file modifier convert :)

Its unmodified. I got antsy waiting for a response so as Marco mentioned - I dared to post it as a bug http://www.vbulletin.com/forum/bugs35.php?do=view&bugid=1143

It was classed as 'not a bug' but now its been changed to 'unconfirmed'.

The array could be able to contain text - but once cleansed I the values would be 0.

Then again - I have to say Im only guessing about the data type.