The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
declaring array's
what's the quickest way to find out which arrays you forgot to declare in a script?
|
#2
|
|||
|
|||
Rewrite you script and this time decalre all arrays before using them
|
#3
|
||||
|
||||
The print_r function will print out all values of an array and it's indeces. But as Marco pointed out, it's good programming practice to declare all variables at the start of the script. I'd also recommend using unset on the variable first to clear out any injected value.
|
#4
|
||||
|
||||
gah i know theirs an undefined array in here somewhere but i can't find it
this does mean undeclared array right? PHP Code:
|
#5
|
|||
|
|||
Well you are passing a variable that is not an array somewhere where an array is expected, that's for sure.
Did you do a: PHP Code:
|
#6
|
||||
|
||||
Quote:
oh well i'll find it it's in one of two scripts so shouldn't be that hard to find. |
#7
|
|||
|
|||
You used to be able to use non-arrays in array_merge, this changed not to long ago in php and now array_merge only accepts arrays.
|
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|