Title: PHP Warning: Undefined array key in GoAffPro
Last modified: January 14, 2026

---

# PHP Warning: Undefined array key in GoAffPro

 *  [Maxime Michaud](https://wordpress.org/support/users/maximemichaud/)
 * (@maximemichaud)
 * [4 months, 2 weeks ago](https://wordpress.org/support/topic/php-warning-undefined-array-key-in-goaffpro/)
 * Hello,
 * I encountered a PHP Warning in the GoAffPro plugin version 2.7.10 when using 
   WordPress 6.9 on PHP 8.3.
 * File Path:
   wp-content/plugins/goaffpro/goaffpro.php. The issue occurs on line
   109.
 * Warning Details (From debug.log):
   PHP Warning: Undefined array key “gfp_v_id”
   in /var/www/website/wp-content/plugins/goaffpro/goaffpro.php on line 109
 * Problem Description:
   The code at line 109 attempts to access $_COOKIE[‘gfp_v_id’]
   without first checking if the key exists using isset(). This causes a warning
   in PHP 8.3 when the cookie is not present.
 * Current code (line 109):
   $visit_id = sanitize_text_field($_COOKIE[‘gfp_v_id’]);
 * The same function correctly handles the ‘ref’ cookie at line 102 by checking 
   isset($_COOKIE[‘ref’]) before accessing it. The ‘gfp_v_id’ cookie should use 
   the same approach.
 * Suggested fix:
   Add an isset() check before accessing $_COOKIE[‘gfp_v_id’], similar
   to the pattern used for the ‘ref’ cookie in the same function.
 * Server Environment:
    - PHP version: 8.3
    - WordPress version: 6.9
    - GoAffPro version: 2.7.10 (latest)
 * Request: Could you please add the missing isset() check for the ‘gfp_v_id’ cookie
   to prevent this warning?
 * Thank you for your attention to this matter.
 * CC [https://wordpress.org/support/topic/undefined-index-variations/](https://wordpress.org/support/topic/undefined-index-variations/)

You must be [logged in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fphp-warning-undefined-array-key-in-goaffpro%2F%3Foutput_format%3Dmd&locale=en_US)
to reply to this topic.

 * ![](https://ps.w.org/goaffpro/assets/icon.svg?rev=2437187)
 * [Goaffpro Affiliate Marketing](https://wordpress.org/plugins/goaffpro/)
 * [Support Threads](https://wordpress.org/support/plugin/goaffpro/)
 * [Active Topics](https://wordpress.org/support/plugin/goaffpro/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/goaffpro/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/goaffpro/reviews/)

 * 0 replies
 * 1 participant
 * Last reply from: [Maxime Michaud](https://wordpress.org/support/users/maximemichaud/)
 * Last activity: [4 months, 2 weeks ago](https://wordpress.org/support/topic/php-warning-undefined-array-key-in-goaffpro/)
 * Status: not resolved