Title: &#8220;Undefined Index&#8221; &amp; &#8220;Undefined Variable&#8221; errors
Last modified: March 9, 2017

---

# “Undefined Index” & “Undefined Variable” errors

 *  Resolved [hightechdad](https://wordpress.org/support/users/hightechdad/)
 * (@hightechdad)
 * [9 years, 2 months ago](https://wordpress.org/support/topic/undefined-index-undefined-variable-errors/)
 * I repeatedly am seeing the following errors in my debug log related to your plugin(
   plugin is great, btw):
 *     ```
       Undefined index: custom in wp-content/plugins/quick-paypal-payments/quick-paypal-payments.php on line 1771
   
       Undefined variable: bg in wp-content/plugins/quick-paypal-payments/quick-paypal-payments.php on line 1481
   
       Undefined variable: output in wp-content/plugins/quick-paypal-payments/quick-paypal-payments.php on line 1375
   
       Undefined index: combobox in wp-content/plugins/quick-paypal-payments/quick-paypal-payments.php on line 804
   
       Undefined index: handle-colours in wp-content/plugins/quick-paypal-payments/quick-paypal-style.php on line 52
   
       Undefined variable: bg in wp-content/plugins/quick-paypal-payments/quick-paypal-style.php on line 56
       ```
   
 * And also these errors:
 *     ```
       Trying to get property of non-object in wp-content/plugins/easy-paypal-custom-fields/easy-paypal-custom-fields.php on line 1079
   
       Trying to get property of non-object in wp-content/plugins/easy-paypal-custom-fields/easy-paypal-custom-fields.php on line 926
       ```
   
 * Just wanted to let you know.
    Thanks!

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

 *  [Graham](https://wordpress.org/support/users/aerin/)
 * (@aerin)
 * [9 years, 2 months ago](https://wordpress.org/support/topic/undefined-index-undefined-variable-errors/#post-8968796)
 * I’m working my way through all of these. I will upload an update soon with this
   fix and some other minor tweaks.
 *  [Graham](https://wordpress.org/support/users/aerin/)
 * (@aerin)
 * [9 years, 1 month ago](https://wordpress.org/support/topic/undefined-index-undefined-variable-errors/#post-9001158)
 * Hopefully the latest fixes all these (at least I don’t see them any more).
 *  Thread Starter [hightechdad](https://wordpress.org/support/users/hightechdad/)
 * (@hightechdad)
 * [9 years, 1 month ago](https://wordpress.org/support/topic/undefined-index-undefined-variable-errors/#post-9002366)
 * Yep, not seeing these errors any more. Thank you!
 *  [Larry Daniele](https://wordpress.org/support/users/larrydaniele/)
 * (@larrydaniele)
 * [8 years, 10 months ago](https://wordpress.org/support/topic/undefined-index-undefined-variable-errors/#post-9351475)
 * I’ve got QPP v5.5.1 running on WordPress 4.8 and PHP 5.6.30 and I’m still getting
   lots of errors in the log such as these:
 * > Today
   >  18:04:20 EDT Undefined variable: bg Type: PHP Notice Line: 1656 File:/
   > home/rrcsadmin/public_html/wp-content/plugins/quick-paypal-payments/quick-paypal-
   > payments.php
   > Today
   >  18:07:43 EDT Undefined variable: header Type: PHP Notice Line: 1655 
   > File: /home/rrcsadmin/public_html/wp-content/plugins/quick-paypal-payments/
   > quick-paypal-payments.php
   > Today
   >  18:07:46 EDT Undefined variable: submitfont Type: PHP Notice Line: 1636
   > File: /home/rrcsadmin/public_html/wp-content/plugins/quick-paypal-payments/
   > quick-paypal-payments.php
   > Today
   >  18:07:46 EDT Undefined variable: submitfont Type: PHP Notice Line: 1633
   > File: /home/rrcsadmin/public_html/wp-content/plugins/quick-paypal-payments/
   > quick-paypal-payments.php
   > Today
   >  18:07:46 EDT Undefined variable: font Type: PHP Notice Line: 1623 File:/
   > home/rrcsadmin/public_html/wp-content/plugins/quick-paypal-payments/quick-paypal-
   > payments.php
   > Today
   >  18:07:46 EDT Undefined variable: inputfont Type: PHP Notice Line: 1621
   > File: /home/rrcsadmin/public_html/wp-content/plugins/quick-paypal-payments/
   > quick-paypal-payments.php
 * So it seems to still be a problem to me. I’d be glad to test or try anything 
   reasonable to help debug this.
 *  [Graham](https://wordpress.org/support/users/aerin/)
 * (@aerin)
 * [8 years, 10 months ago](https://wordpress.org/support/topic/undefined-index-undefined-variable-errors/#post-9354462)
 * Upgrade your php to V7. That will get things updated to the correct standard.
 * None of those messages stop anything working, it’s just PHP getting all narky
   because I call the variables before defining them. However, not sure why you 
   are seeing them as they were all cleared at the last update.
 * I’ll do some investigation while you are upgrading to php7.
 *  [Larry Daniele](https://wordpress.org/support/users/larrydaniele/)
 * (@larrydaniele)
 * [8 years, 10 months ago](https://wordpress.org/support/topic/undefined-index-undefined-variable-errors/#post-9354829)
 * Thanks for your suggestion. My client’s site is hosted on GoDaddy and sadly PHP
   7 was not an option in the past. But I see that GoDaddy just announced support
   for PHP 7.0 and 7.1. I’ll give PHP 7.1 a whirl!
 *  [k1rah](https://wordpress.org/support/users/k1rah/)
 * (@k1rah)
 * [8 years, 10 months ago](https://wordpress.org/support/topic/undefined-index-undefined-variable-errors/#post-9361685)
 * I am also seeing a bunch of these errors. I have debug set to ‘true’ so I can
   see them on screen.
 * Unfortunately using PHP 7 is not going to be an option for everyone. When I changed
   to PHP 7, I got a fatal error “unable to connect to database” from other plugins.
 *  [Graham](https://wordpress.org/support/users/aerin/)
 * (@aerin)
 * [8 years, 10 months ago](https://wordpress.org/support/topic/undefined-index-undefined-variable-errors/#post-9361717)
 * They aren’t errors. They are just messages from PHP telling you that a variable
   hasn’t been defined before use.
 * I do try to catch them all but with over 2000 variables used in the plugin some
   slip through the net.
 * Set debug to false and you won’t see the messages.
 * PHP 5.X is no longer supported, you will at some point have to upgrade to PHP
   7. Not doing so may put your site at risk.

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

The topic ‘“Undefined Index” & “Undefined Variable” errors’ is closed to new replies.

 * ![](https://ps.w.org/quick-paypal-payments/assets/icon-128x128.png?rev=3412386)
 * [Quick Paypal Payments](https://wordpress.org/plugins/quick-paypal-payments/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/quick-paypal-payments/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/quick-paypal-payments/)
 * [Active Topics](https://wordpress.org/support/plugin/quick-paypal-payments/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/quick-paypal-payments/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/quick-paypal-payments/reviews/)

 * 8 replies
 * 4 participants
 * Last reply from: [Graham](https://wordpress.org/support/users/aerin/)
 * Last activity: [8 years, 10 months ago](https://wordpress.org/support/topic/undefined-index-undefined-variable-errors/#post-9361717)
 * Status: resolved