Title: PHP Warning: array_map(): Argument #2
Last modified: June 4, 2018

---

# PHP Warning: array_map(): Argument #2

 *  Resolved [bedazelive](https://wordpress.org/support/users/bedazelive/)
 * (@bedazelive)
 * [7 years, 11 months ago](https://wordpress.org/support/topic/php-warning-array_map-argument-2/)
 * Hi there!
 * I’d like to let you know that since the last update on May 30th, I’ve been getting
   lots of PHP Warnings and my site suffered a significant decrease in speed.
    I’ve
   checked the error log and the GDPR plugin seems to be the problem. Can you please
   help me out? Thanks! Here are the logs:
 * [30-May-2018 11:37:55 UTC] PHP Warning: array_keys() expects parameter 1 to be
   array, string given in /home4/yoogzyco/public_html/wp-content/plugins/gdpr/includes/
   class-gdpr.php on line 308
    [30-May-2018 11:37:55 UTC] PHP Warning: array_map():
   Argument #2 should be an array in /home4/yoogzyco/public_html/wp-content/plugins/
   gdpr/includes/class-gdpr.php on line 308 [30-May-2018 11:37:55 UTC] PHP Warning:
   Invalid argument supplied for foreach() in /home4/yoogzyco/public_html/wp-content/
   plugins/gdpr/includes/class-gdpr.php on line 309 [30-May-2018 12:12:33 UTC] PHP
   Warning: array_keys() expects parameter 1 to be array, string given in /home4/
   yoogzyco/public_html/wp-content/plugins/gdpr/includes/class-gdpr.php on line 
   308 [30-May-2018 12:12:33 UTC] PHP Warning: array_map(): Argument #2 should be
   an array in /home4/yoogzyco/public_html/wp-content/plugins/gdpr/includes/class-
   gdpr.php on line 308 [30-May-2018 12:12:33 UTC] PHP Warning: Invalid argument
   supplied for foreach() in /home4/yoogzyco/public_html/wp-content/plugins/gdpr/
   includes/class-gdpr.php on line 309 [30-May-2018 22:47:32 UTC] PHP Warning: array_keys()
   expects parameter 1 to be array, string given in /home4/yoogzyco/public_html/
   wp-content/plugins/gdpr/includes/class-gdpr.php on line 308 [30-May-2018 22:47:
   32 UTC] PHP Warning: array_map(): Argument #2 should be an array in /home4/yoogzyco/
   public_html/wp-content/plugins/gdpr/includes/class-gdpr.php on line 308 [30-May-
   2018 22:47:32 UTC] PHP Warning: Invalid argument supplied for foreach() in /home4/
   yoogzyco/public_html/wp-content/plugins/gdpr/includes/class-gdpr.php on line 
   309 [31-May-2018 07:51:35 UTC] PHP Warning: array_keys() expects parameter 1 
   to be array, string given in /home4/yoogzyco/public_html/wp-content/plugins/gdpr/
   includes/class-gdpr.php on line 308 [31-May-2018 07:51:35 UTC] PHP Warning: array_map():
   Argument #2 should be an array in /home4/yoogzyco/public_html/wp-content/plugins/
   gdpr/includes/class-gdpr.php on line 308 [31-May-2018 07:51:35 UTC] PHP Warning:
   Invalid argument supplied for foreach() in /home4/yoogzyco/public_html/wp-content/
   plugins/gdpr/includes/class-gdpr.php on line 309 [31-May-2018 11:18:44 UTC] PHP
   Warning: array_keys() expects parameter 1 to be array, string given in /home4/
   yoogzyco/public_html/wp-content/plugins/gdpr/includes/class-gdpr.php on line 
   308 [31-May-2018 11:18:44 UTC] PHP Warning: array_map(): Argument #2 should be
   an array in /home4/yoogzyco/public_html/wp-content/plugins/gdpr/includes/class-
   gdpr.php on line 308 [31-May-2018 11:18:44 UTC] PHP Warning: Invalid argument
   supplied for foreach() in /home4/yoogzyco/public_html/wp-content/plugins/gdpr/
   includes/class-gdpr.php on line 309 [31-May-2018 16:19:17 UTC] PHP Warning: array_keys()
   expects parameter 1 to be array, string given in /home4/yoogzyco/public_html/
   wp-content/plugins/gdpr/includes/class-gdpr.php on line 308 [31-May-2018 16:19:
   17 UTC] PHP Warning: array_map(): Argument #2 should be an array in /home4/yoogzyco/
   public_html/wp-content/plugins/gdpr/includes/class-gdpr.php on line 308 [31-May-
   2018 16:19:17 UTC] PHP Warning: Invalid argument supplied for foreach() in /home4/
   yoogzyco/public_html/wp-content/plugins/gdpr/includes/class-gdpr.php on line 
   309 [31-May-2018 18:54:27 UTC] PHP Warning: array_keys() expects parameter 1 
   to be array, string given in /home4/yoogzyco/public_html/wp-content/plugins/gdpr/
   includes/class-gdpr.php on line 308 [31-May-2018 18:54:27 UTC] PHP Warning: array_map():
   Argument #2 should be an array in /home4/yoogzyco/public_html/wp-content/plugins/
   gdpr/includes/class-gdpr.php on line 308 [31-May-2018 18:54:27 UTC] PHP Warning:
   Invalid argument supplied for foreach() in /home4/yoogzyco/public_html/wp-content/
   plugins/gdpr/includes/class-gdpr.php on line 309 [01-Jun-2018 20:47:08 UTC] PHP
   Warning: array_keys() expects parameter 1 to be array, string given in /home4/
   yoogzyco/public_html/wp-content/plugins/gdpr/includes/class-gdpr.php on line 
   308 [01-Jun-2018 20:47:08 UTC] PHP Warning: array_map(): Argument #2 should be
   an array in /home4/yoogzyco/public_html/wp-content/plugins/gdpr/includes/class-
   gdpr.php on line 308 [01-Jun-2018 20:47:08 UTC] PHP Warning: Invalid argument
   supplied for foreach() in /home4/yoogzyco/public_html/wp-content/plugins/gdpr/
   includes/class-gdpr.php on line 309 [02-Jun-2018 08:04:03 UTC] PHP Warning: array_keys()
   expects parameter 1 to be array, string given in /home4/yoogzyco/public_html/
   wp-content/plugins/gdpr/includes/class-gdpr.php on line 308 [02-Jun-2018 08:04:
   03 UTC] PHP Warning: array_map(): Argument #2 should be an array in /home4/yoogzyco/
   public_html/wp-content/plugins/gdpr/includes/class-gdpr.php on line 308 [02-Jun-
   2018 08:04:03 UTC] PHP Warning: Invalid argument supplied for foreach() in /home4/
   yoogzyco/public_html/wp-content/plugins/gdpr/includes/class-gdpr.php on line 
   309 [03-Jun-2018 15:32:13 UTC] PHP Warning: array_keys() expects parameter 1 
   to be array, string given in /home4/yoogzyco/public_html/wp-content/plugins/gdpr/
   includes/class-gdpr.php on line 308 [03-Jun-2018 15:32:13 UTC] PHP Warning: array_map():
   Argument #2 should be an array in /home4/yoogzyco/public_html/wp-content/plugins/
   gdpr/includes/class-gdpr.php on line 308 [03-Jun-2018 15:32:13 UTC] PHP Warning:
   Invalid argument supplied for foreach() in /home4/yoogzyco/public_html/wp-content/
   plugins/gdpr/includes/class-gdpr.php on line 309 [03-Jun-2018 23:18:26 UTC] PHP
   Warning: array_keys() expects parameter 1 to be array, string given in /home4/
   yoogzyco/public_html/wp-content/plugins/gdpr/includes/class-gdpr.php on line 
   308 [03-Jun-2018 23:18:26 UTC] PHP Warning: array_map(): Argument #2 should be
   an array in /home4/yoogzyco/public_html/wp-content/plugins/gdpr/includes/class-
   gdpr.php on line 308 [03-Jun-2018 23:18:26 UTC] PHP Warning: Invalid argument
   supplied for foreach() in /home4/yoogzyco/public_html/wp-content/plugins/gdpr/
   includes/class-gdpr.php on line 309 [03-Jun-2018 23:37:24 UTC] PHP Warning: array_keys()
   expects parameter 1 to be array, string given in /home4/yoogzyco/public_html/
   wp-content/plugins/gdpr/includes/class-gdpr.php on line 308 [03-Jun-2018 23:37:
   24 UTC] PHP Warning: array_map(): Argument #2 should be an array in /home4/yoogzyco/
   public_html/wp-content/plugins/gdpr/includes/class-gdpr.php on line 308 [03-Jun-
   2018 23:37:24 UTC] PHP Warning: Invalid argument supplied for foreach() in /home4/
   yoogzyco/public_html/wp-content/plugins/gdpr/includes/class-gdpr.php on line 
   309 [04-Jun-2018 01:07:06 UTC] PHP Warning: array_keys() expects parameter 1 
   to be array, string given in /home4/yoogzyco/public_html/wp-content/plugins/gdpr/
   includes/class-gdpr.php on line 308 [04-Jun-2018 01:07:06 UTC] PHP Warning: array_map():
   Argument #2 should be an array in /home4/yoogzyco/public_html/wp-content/plugins/
   gdpr/includes/class-gdpr.php on line 308 [04-Jun-2018 01:07:06 UTC] PHP Warning:
   Invalid argument supplied for foreach() in /home4/yoogzyco/public_html/wp-content/
   plugins/gdpr/includes/class-gdpr.php on line 309 [04-Jun-2018 02:46:54 UTC] PHP
   Warning: array_keys() expects parameter 1 to be array, string given in /home4/
   yoogzyco/public_html/wp-content/plugins/gdpr/includes/class-gdpr.php on line 
   308 [04-Jun-2018 02:46:54 UTC] PHP Warning: array_map(): Argument #2 should be
   an array in /home4/yoogzyco/public_html/wp-content/plugins/gdpr/includes/class-
   gdpr.php on line 308 [04-Jun-2018 02:46:54 UTC] PHP Warning: Invalid argument
   supplied for foreach() in /home4/yoogzyco/public_html/wp-content/plugins/gdpr/
   includes/class-gdpr.php on line 309 [04-Jun-2018 06:36:03 UTC] PHP Warning: array_keys()
   expects parameter 1 to be array, string given in /home4/yoogzyco/public_html/
   wp-content/plugins/gdpr/includes/class-gdpr.php on line 308 [04-Jun-2018 06:36:
   03 UTC] PHP Warning: array_map(): Argument #2 should be an array in /home4/yoogzyco/
   public_html/wp-content/plugins/gdpr/includes/class-gdpr.php on line 308 [04-Jun-
   2018 06:36:03 UTC] PHP Warning: Invalid argument supplied for foreach() in /home4/
   yoogzyco/public_html/wp-content/plugins/gdpr/includes/class-gdpr.php on line 
   309 [04-Jun-2018 07:15:31 UTC] PHP Warning: array_keys() expects parameter 1 
   to be array, string given in /home4/yoogzyco/public_html/wp-content/plugins/gdpr/
   includes/class-gdpr.php on line 308 [04-Jun-2018 07:15:31 UTC] PHP Warning: array_map():
   Argument #2 should be an array in /home4/yoogzyco/public_html/wp-content/plugins/
   gdpr/includes/class-gdpr.php on line 308 [04-Jun-2018 07:15:31 UTC] PHP Warning:
   Invalid argument supplied for foreach() in /home4/yoogzyco/public_html/wp-content/
   plugins/gdpr/includes/class-gdpr.php on line 309 [04-Jun-2018 16:48:29 UTC] PHP
   Warning: array_keys() expects parameter 1 to be array, string given in /home4/
   yoogzyco/public_html/wp-content/plugins/gdpr/includes/class-gdpr.php on line 
   308 [04-Jun-2018 16:48:29 UTC] PHP Warning: array_map(): Argument #2 should be
   an array in /home4/yoogzyco/public_html/wp-content/plugins/gdpr/includes/class-
   gdpr.php on line 308 [04-Jun-2018 16:48:29 UTC] PHP Warning: Invalid argument
   supplied for foreach() in /home4/yoogzyco/public_html/wp-content/plugins/gdpr/
   includes/class-gdpr.php on line 309
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fphp-warning-array_map-argument-2%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 1 replies (of 1 total)

 *  Plugin Author [Fernando Claussen](https://wordpress.org/support/users/fclaussen/)
 * (@fclaussen)
 * [7 years, 11 months ago](https://wordpress.org/support/topic/php-warning-array_map-argument-2/#post-10362939)
 * Thank you for reporting this. Another user reported the same issue.
    I’ve got
   a fix in place and it will be fixed in tomorrow’s update.
 * Let me know if that issue persists after updating.

Viewing 1 replies (of 1 total)

The topic ‘PHP Warning: array_map(): Argument #2’ is closed to new replies.

 * ![](https://ps.w.org/gdpr/assets/icon.svg?rev=1837142)
 * [GDPR](https://wordpress.org/plugins/gdpr/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/gdpr/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/gdpr/)
 * [Active Topics](https://wordpress.org/support/plugin/gdpr/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/gdpr/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/gdpr/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Fernando Claussen](https://wordpress.org/support/users/fclaussen/)
 * Last activity: [7 years, 11 months ago](https://wordpress.org/support/topic/php-warning-array_map-argument-2/#post-10362939)
 * Status: resolved