![]() |
Variable scope within plugins
I'm trying to debug one of my plugins and see why it's outputting an error. The obvious thing would be to output the variables and check they are all there right?
Try putting this in global_complete: PHP Code:
PHP Code:
|
Yes :)
You are missing that global_complete is within function print_output(), so $var will only be visible within this function - but not in moo(), even though you define it as global there. |
Ah of course - thanks! And congratulations on your new role ;)
|
All times are GMT. The time now is 11:59 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|