Hi, interesting, when does this happen?
Regards
Nickolas
on every load of wp-admin and when WP_DEBUG mode is true
Have you made any changes to plugin’s settings? Can you send me a screenshot of Settings?
Nickolas
I cannot reproduce your error. Seems that something is not working as expected. Do you have any special scripts in functions.php?
Nickolas
yes. I have some custom code.
Does it create or change any new globals $GLOBALS[“WFU_GLOBALS”] ?
Nickolas
Yes I change the $GLOBALS[“WFU_GLOBALS”][‘WFU_UPLOADEDFILES_BARMENU’] in an wp_loaded hook!
Can you send me the code you used?
Nickolas
add_action('wp_loaded', 'remove_wfu_admin_toolbar_new_uploads');
function remove_wfu_admin_toolbar_new_uploads(){
$GLOBALS["WFU_GLOBALS"]['WFU_UPLOADEDFILES_BARMENU']= array( "Uploaded Files Toolbar Menu State", "string", "false", "Defines whether the Uploaded Files Toolbar (Admin Bar) menu item will be shown or not. It can be 'true' or 'false'." );
}
Change it like this:
add_action('wp_loaded', 'remove_wfu_admin_toolbar_new_uploads');
function remove_wfu_admin_toolbar_new_uploads(){
$GLOBALS["WFU_GLOBALS"]['WFU_UPLOADEDFILES_BARMENU']= array( "Uploaded Files Toolbar Menu State", "string", "false", "false", "Defines whether the Uploaded Files Toolbar (Admin Bar) menu item will be shown or not. It can be 'true' or 'false'.", true );
}
Any better?
Nickolas
Yes it solves the problem.
What was the problem with this code?
The variable $GLOBALS[“WFU_GLOBALS”][‘WFU_UPLOADEDFILES_BARMENU’] is an array which should normally have 6 items. In your initial code it was initialized with only 4 items, so when the plugin tried to access item with offset 5 (this is the 6th item) it could not find it and threw a warning.
Nickolas
ok, Thanks for the answer