The Arcive of vBulletin Modifications Site. |
|
|
#1
|
||||
|
||||
|
In the admincp file for the hack I'm doing, if the foreach functions return empty it returns
Quote:
Thanks. :up: |
|
#2
|
||||
|
||||
|
Check if the array you're looping has any data beforehand.
|
|
#3
|
||||
|
||||
|
Nope, empty. I normally would of thought it'd be something like
PHP Code:
|
|
#4
|
|||
|
|||
|
Look in the vBulletin AdminCP files and see how they display their errors, then just duplicate this in your conditional. (They use fetch_error() and another function print_cp_message(), I think) Look them up in the API manual: vBulletin 3.6 Code Documentation.
You may have to create a phrase the "Error Messages" Phrasegroup. |
|
#5
|
||||
|
||||
|
If it's not a variable, then it can't be applied with the foreach language construct. That's what's giving you the error. If the supplied var is empty, foreach just skips it.
|
![]() |
|
|
| X vBulletin 3.8.12 by vBS Debug Information | |
|---|---|
|
|
More Information |
|
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|