Title: plugin throw a php notice
Last modified: April 17, 2020

---

# plugin throw a php notice

 *  Resolved [Pexle Chris](https://wordpress.org/support/users/pexlechris/)
 * (@pexlechris)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/plugin-throw-a-php-notice/)
 * Your plugin throws a php notice
    Notice: Undefined offset: 5 in /var/www/vhosts/
   onlymaths.gr/httpdocs/wp-content/plugins/wp-file-upload/lib/wfu_functions.php
   on line 1509

Viewing 14 replies - 1 through 14 (of 14 total)

 *  Plugin Author [nickboss](https://wordpress.org/support/users/nickboss/)
 * (@nickboss)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/plugin-throw-a-php-notice/#post-12692986)
 * Hi, interesting, when does this happen?
 * Regards
 * Nickolas
 *  Thread Starter [Pexle Chris](https://wordpress.org/support/users/pexlechris/)
 * (@pexlechris)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/plugin-throw-a-php-notice/#post-12693114)
 * on every load of wp-admin and when WP_DEBUG mode is true
 *  Plugin Author [nickboss](https://wordpress.org/support/users/nickboss/)
 * (@nickboss)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/plugin-throw-a-php-notice/#post-12696755)
 * Have you made any changes to plugin’s settings? Can you send me a screenshot 
   of Settings?
 * Nickolas
 *  Thread Starter [Pexle Chris](https://wordpress.org/support/users/pexlechris/)
 * (@pexlechris)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/plugin-throw-a-php-notice/#post-12696772)
 * [https://drive.google.com/file/d/1oZBbgDidIgNrPrkE4y2hWumBGpVHAWN-/view](https://drive.google.com/file/d/1oZBbgDidIgNrPrkE4y2hWumBGpVHAWN-/view)
 * (WP_DEBUG is now false)
 *  Plugin Author [nickboss](https://wordpress.org/support/users/nickboss/)
 * (@nickboss)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/plugin-throw-a-php-notice/#post-12697135)
 * I cannot reproduce your error. Seems that something is not working as expected.
   Do you have any special scripts in functions.php?
 * Nickolas
 *  Thread Starter [Pexle Chris](https://wordpress.org/support/users/pexlechris/)
 * (@pexlechris)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/plugin-throw-a-php-notice/#post-12697303)
 * yes. I have some custom code.
 *  Plugin Author [nickboss](https://wordpress.org/support/users/nickboss/)
 * (@nickboss)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/plugin-throw-a-php-notice/#post-12697377)
 * Does it create or change any new globals $GLOBALS[“WFU_GLOBALS”] ?
 * Nickolas
 *  Thread Starter [Pexle Chris](https://wordpress.org/support/users/pexlechris/)
 * (@pexlechris)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/plugin-throw-a-php-notice/#post-12698056)
 * Yes I change the $GLOBALS[“WFU_GLOBALS”][‘WFU_UPLOADEDFILES_BARMENU’] in an wp_loaded
   hook!
 *  Plugin Author [nickboss](https://wordpress.org/support/users/nickboss/)
 * (@nickboss)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/plugin-throw-a-php-notice/#post-12706228)
 * Can you send me the code you used?
 * Nickolas
 *  Thread Starter [Pexle Chris](https://wordpress.org/support/users/pexlechris/)
 * (@pexlechris)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/plugin-throw-a-php-notice/#post-12706288)
 *     ```
       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'." );
       }
       ```
   
 *  Plugin Author [nickboss](https://wordpress.org/support/users/nickboss/)
 * (@nickboss)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/plugin-throw-a-php-notice/#post-12706867)
 * 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
 *  Thread Starter [Pexle Chris](https://wordpress.org/support/users/pexlechris/)
 * (@pexlechris)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/plugin-throw-a-php-notice/#post-12727193)
 * Yes it solves the problem.
 * What was the problem with this code?
 *  Plugin Author [nickboss](https://wordpress.org/support/users/nickboss/)
 * (@nickboss)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/plugin-throw-a-php-notice/#post-12732684)
 * 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
 *  Thread Starter [Pexle Chris](https://wordpress.org/support/users/pexlechris/)
 * (@pexlechris)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/plugin-throw-a-php-notice/#post-12732714)
 * ok, Thanks for the answer

Viewing 14 replies - 1 through 14 (of 14 total)

The topic ‘plugin throw a php notice’ is closed to new replies.

 * ![](https://ps.w.org/wp-file-upload/assets/icon-256x256.png?rev=3252590)
 * [Iptanus File Upload](https://wordpress.org/plugins/wp-file-upload/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-file-upload/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-file-upload/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-file-upload/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-file-upload/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-file-upload/reviews/)

 * 14 replies
 * 2 participants
 * Last reply from: [Pexle Chris](https://wordpress.org/support/users/pexlechris/)
 * Last activity: [6 years, 1 month ago](https://wordpress.org/support/topic/plugin-throw-a-php-notice/#post-12732714)
 * Status: resolved