Title: PHP Warning: Undefined array
Last modified: October 5, 2023

---

# PHP Warning: Undefined array

 *  Resolved [akuljana](https://wordpress.org/support/users/akuljana/)
 * (@akuljana)
 * [2 years, 7 months ago](https://wordpress.org/support/topic/php-warning-undefined-array/)
 * Hi, we receiving this error:
 * _PHP message: PHP Warning: Undefined array key 1 in /wp-content/plugins/woo-auto-
   coupons/wac\_functions.php on line 357_
 * Can you check on this?
 * PHP version is 8.0. and latest plugin version. Thank you!
    -  This topic was modified 2 years, 7 months ago by [akuljana](https://wordpress.org/support/users/akuljana/).

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

 *  Plugin Author [RLDD](https://wordpress.org/support/users/rermis/)
 * (@rermis)
 * [2 years, 7 months ago](https://wordpress.org/support/topic/php-warning-undefined-array/#post-17103270)
 * Hi [@akuljana](https://wordpress.org/support/users/akuljana/),
 *  Thank you for reporting this bug. You may find a potential fix for this error
   in today’s release, version 2.3.6.
 * Please let me know if this does not resolve the problem.
 * Thank you!
 *  Thread Starter [akuljana](https://wordpress.org/support/users/akuljana/)
 * (@akuljana)
 * [2 years, 7 months ago](https://wordpress.org/support/topic/php-warning-undefined-array/#post-17109611)
 * Hi, after update we have fatal errors:
 * _PHP message: PHP Fatal error: Uncaught WpOrg\Requests\Exception\InvalidArgument:
   WpOrg\Requests\Cookie::\_\_construct(): Argument #1 ($name) must be of type string,
   integer given in /wp-includes/Requests/src/Exception/InvalidArgument.php:29
   Stack
   trace: 0 /wp-includes/Requests/src/Cookie.php(84): WpOrg\Requests\Exception\InvalidArgument::
   create(1, ‘$name’, ‘string’, ‘integer’) 1 /wp-includes/class-wp-http.php(472):
   WpOrg\Requests\Cookie->\_\_construct(2865, ”)
 *  Plugin Author [RLDD](https://wordpress.org/support/users/rermis/)
 * (@rermis)
 * [2 years, 7 months ago](https://wordpress.org/support/topic/php-warning-undefined-array/#post-17111818)
 * Hi [@akuljana](https://wordpress.org/support/users/akuljana/),
 * Thank you for your response. In this particular error message, I cannot find 
   a relationship between the error and the Auto Coupons plugin.
 * The first message in the thread was an error in /wp-content/plugins/woo-auto-
   coupons/wac_functions.php on line 357 and I believe that to be resolved.
 * The fatal error from the last message points to an error in the cookie construct
   from WpOrg\Requests. Since the plugin Auto Coupons doesn’t use requests, the 
   directory, or create or manage cookies, or (it only safely checks if a cookie
   exists), it’s possible the error could be from another part of the WP installation.
 * One way to determine with more certainty if the error is caused by the plugin
   is to temporarily deactivate the plugin, and try again. If the same error occurs,
   it is not caused by the Auto Coupons plugin.
 * I hope this helps. Please let me know if you discover conflicting information
   that points back to the plugin.

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

The topic ‘PHP Warning: Undefined array’ is closed to new replies.

 * ![](https://ps.w.org/woo-auto-coupons/assets/icon-256x256.png?rev=3405507)
 * [Auto Coupons for WooCommerce](https://wordpress.org/plugins/woo-auto-coupons/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/woo-auto-coupons/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/woo-auto-coupons/)
 * [Active Topics](https://wordpress.org/support/plugin/woo-auto-coupons/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woo-auto-coupons/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woo-auto-coupons/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [RLDD](https://wordpress.org/support/users/rermis/)
 * Last activity: [2 years, 7 months ago](https://wordpress.org/support/topic/php-warning-undefined-array/#post-17111818)
 * Status: resolved