The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
function problem with globalising query
the call to the function is
PHP Code:
PHP Code:
|
#2
|
||||
|
||||
Should work.
Are you sure it dies have a valid record? Btw: I would implement it as PHP Code:
But maybe PHP is smart enough to optimize this itself? |
#3
|
||||
|
||||
switched to yours and still won't let them edit based on the $pieceexists['userid' matching the bbuserinfo[userid]
i've even tried adding debug stuff to the funtion like if (!$pieceexists) { echo "i'm gonna die"; die('i am dead'); } and still nope, but i don't get that error being in usergroupd 6? |
#4
|
||||
|
||||
DEVDEBUG("pieceuid = $pieceexists[userid], bbuserid = $bbuserinfo[userid]");
What does output (you can also echo or die, doesn't matter) does that generate? |
#5
|
||||
|
||||
from within the function "pieceuid = , bbuserid = 10"
just tried assigning it to it's own $puid variable and it still refuses to pass into this function :S |
#6
|
||||
|
||||
And before the function call?
print_r($pieceexists) before and within the function? Btw: are you calling it form within another function? |
#7
|
||||
|
||||
before the function call it gives me the correct array
before the functions defined in the relevant function.php it's blank and in the function it's also blank and nope it's not within any function bar the conditional (if) |
#8
|
||||
|
||||
> before the functions defined in the relevant function.php it's blank
I don't understand that. But I think you got a Problem with Variable Scope. Where exactly is the calling Code located, where is the function located? |
#9
|
||||
|
||||
what i mean is
PHP Code:
the function is near the bottom of functions_prs.php located in the includes directory. and the call is located in modify.php outside of the forums directory in www.home.com/creative |
#10
|
||||
|
||||
Well, this print_r() will most likely always be blank, as you are requiring functions_prs.php before querying $pieceexists.
IMHO, all the code pieces you've shown so far seem to be OK. |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|