Title: array_map() Error
Last modified: August 30, 2016

---

# array_map() Error

 *  Resolved [Opa114](https://wordpress.org/support/users/opa114/)
 * (@opa114)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/array_map-error/)
 * I use the latest version of Events Manager and i did regognize an error like 
   the last on with the categories of events manager enabled.
 * When i disable the categories and try to edit an old event which i have published
   and want so save it i got the following error:
 *     ```
       Warning: array_map(): Argument #2 should be an array in /..../wp/wp-includes/category-template.php on line 1158
   
       Warning: Cannot modify header information - headers already sent by (output started at /..../wp/wp-includes/category-template.php:1158) in /..../wp/wp-admin/post.php on line 197
   
       Warning: Cannot modify header information - headers already sent by (output started at /..../wp/wp-includes/category-template.php:1158) in /..../wp/wp-includes/pluggable.php on line 1228
       ```
   
 * So this error looks similiar to the last one, where WordPress 4.4 was released.
   there the array_map() Error was on the Frontend. Hope you could reproduce the
   error and fix it.
 * When i have categories enabled all works perfectly.
 * [https://wordpress.org/plugins/events-manager/](https://wordpress.org/plugins/events-manager/)

Viewing 15 replies - 1 through 15 (of 26 total)

1 [2](https://wordpress.org/support/topic/array_map-error/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/array_map-error/page/2/?output_format=md)

 *  [caimin_nwl](https://wordpress.org/support/users/caimin_nwl/)
 * (@caimin_nwl)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/array_map-error/#post-6881290)
 * Can you confirm which version of Events Manager you’re using?
 *  Thread Starter [Opa114](https://wordpress.org/support/users/opa114/)
 * (@opa114)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/array_map-error/#post-6881293)
 * latest 5.6.2.
 * I used the one before 5.6.1 on which the error appears on the front-end when 
   i have the calendar or eventlist in my sidebar since wordpress 4.4. (there are
   two therads here on which it was discuessed and fixed with 5.6.2!)
 * But my error only appears when i have categories DISABLED and edit an event which
   i have created. Then when i ENAABLE categories and edit an old event there is
   no error.
 *  [emswpuser](https://wordpress.org/support/users/emswpuser/)
 * (@emswpuser)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/array_map-error/#post-6881309)
 * I’m getting a similar error with 5.6.2:
 * Warning: array_map() [function.array-map]: Argument #2 should be an array in /
   home/…/public_html/wp-includes/category-template.php on line 1158
 * Warning: Cannot modify header information – headers already sent by (output started
   at /home/tappedou/public_html/wp-includes/category-template.php:1158) in /home/…/
   public_html/wp-admin/post.php on line 197
 *  [Marcel Oerlemans](https://wordpress.org/support/users/marceloerlemans/)
 * (@marceloerlemans)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/array_map-error/#post-6881322)
 * Hi,
    I’m getting the error to, frontend.. Warning: array_map(): Argument #2 should
   be an array in /home/…/public_html/wp/wp-includes/category-template.php on line
   1158
 * I use the latest version of Events Manager, WP and other software..
 * Hope someone can figure this out, I’m not a programmer.. 🙁
 *  [caimin_nwl](https://wordpress.org/support/users/caimin_nwl/)
 * (@caimin_nwl)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/array_map-error/#post-6881338)
 * [@opa114](https://wordpress.org/support/users/opa114/) Is the old event you’re
   trying to publish in a category (or was it before you disabled categories)?
 * [@marcel](https://wordpress.org/support/users/marcel/) Oerlemans Do you see this
   error when event categories are enabled, disabled or both?
 *  Thread Starter [Opa114](https://wordpress.org/support/users/opa114/)
 * (@opa114)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/array_map-error/#post-6881339)
 * [@caimin_nwl](https://wordpress.org/support/users/caimin_nwl/): no the event 
   i try to update! (not to publish a new one) has no category. I have disabled 
   categories from beginning on, because i don’t need them.
 *  [Marcel Oerlemans](https://wordpress.org/support/users/marceloerlemans/)
 * (@marceloerlemans)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/array_map-error/#post-6881346)
 * [@caimin_nwl](https://wordpress.org/support/users/caimin_nwl/) : the categories
   were disabled when the error was shown. I tried to enable the categories but 
   the error still appeared, so I disabled them again.
 * The website with the error is:
    [http://golf-open.nl/events/all-inclusive-eindejaarswedstrijd/](http://golf-open.nl/events/all-inclusive-eindejaarswedstrijd/)
 * Is it possible to disable errors on frontend?
 *  [caimin_nwl](https://wordpress.org/support/users/caimin_nwl/)
 * (@caimin_nwl)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/array_map-error/#post-6881362)
 * You should be able disable errors by adding this line to your wp-config.php file:
 * `error_reporting(0);`
 *  Thread Starter [Opa114](https://wordpress.org/support/users/opa114/)
 * (@opa114)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/array_map-error/#post-6881363)
 * [@caimin_nwl](https://wordpress.org/support/users/caimin_nwl/): could you repdroduce
   the error which i’m talking about?
    if not, i could maybe send you some login
   data to my wordpress hosting, so that you can see it in action?!
 *  Plugin Support [angelo_nwl](https://wordpress.org/support/users/angelo_nwl/)
 * (@angelo_nwl)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/array_map-error/#post-6881366)
 * hi,
 * this issue is already been reported however you can try to enable events category
   or tag under events > settings > general > general options for now.
 *  Thread Starter [Opa114](https://wordpress.org/support/users/opa114/)
 * (@opa114)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/array_map-error/#post-6881367)
 * yes i knwo that it has been reported, but i asked if you oudl reproduce the error/
   bug? I have enabled categories to solve it temporarly.
 *  [Marcel Oerlemans](https://wordpress.org/support/users/marceloerlemans/)
 * (@marceloerlemans)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/array_map-error/#post-6881369)
 * Hi caimin_nwl,
    Thanks for your response! I tried disabling category / tag and
   various combinations, but nothing worked. How do I use the error_reporting(0)
   in WP-config? I tried the following:
 *     ```
       define('WP_DEBUG', false);
       define('WP_DEBUG_DISPLAY', false );
       define('ERROR_REPORTING', 0 );
       ```
   
 * But that doesn’t work either…
    I can’t only disable the error with CSS because
   there is more in the post-meta class than just the error.. Hope you can still
   help me out with this! Best regards, Marcel
 *  [emswpuser](https://wordpress.org/support/users/emswpuser/)
 * (@emswpuser)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/array_map-error/#post-6881370)
 * I enabled event categories. Cleared cache on Mac Safari. Sometimes a new event
   goes through, but other times when I try to publish, it gives the error.
 * Warning: array_map() [function.array-map]: Argument #2 should be an array in /
   home/…/public_html/wp-includes/category-template.php on line 1158
 * Warning: Cannot modify header information – headers already sent by (output started
   at /home/tappedou/public_html/wp-includes/category-template.php:1158) in /home/…/
   public_html/wp-admin/post.php on line 197
 *  [jonwolfinger](https://wordpress.org/support/users/jonwolfinger/)
 * (@jonwolfinger)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/array_map-error/#post-6881372)
 * I am having the same problem on one of my sites. I don’t use categories normally
   but enabling them temporarily seems to be a temp fix for single events only. 
   Reoccurring events still experience the error code:
 * Warning: array_map(): Argument #2 should be an array in /wp-includes/category-
   template.php on line 1158
 * Warning: Cannot modify header information – headers already sent by (output started
   at /wp-includes/category-template.php:1158) in /wp-admin/post.php on line 197
 * Warning: Cannot modify header information – headers already sent by (output started
   at /wp-includes/category-template.php:1158) in /wp-includes/pluggable.php on 
   line 1228
 *  [caimin_nwl](https://wordpress.org/support/users/caimin_nwl/)
 * (@caimin_nwl)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/array_map-error/#post-6881383)
 * Which version of Events Manager and WordPress are you guys using?

Viewing 15 replies - 1 through 15 (of 26 total)

1 [2](https://wordpress.org/support/topic/array_map-error/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/array_map-error/page/2/?output_format=md)

The topic ‘array_map() Error’ is closed to new replies.

 * ![](https://ps.w.org/events-manager/assets/icon-256x256.png?rev=1039078)
 * [Events Manager - Calendar, Bookings, Tickets, and more!](https://wordpress.org/plugins/events-manager/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/events-manager/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/events-manager/)
 * [Active Topics](https://wordpress.org/support/plugin/events-manager/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/events-manager/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/events-manager/reviews/)

## Tags

 * [array_map()](https://wordpress.org/support/topic-tag/array_map/)
 * [categories](https://wordpress.org/support/topic-tag/categories/)

 * 26 replies
 * 8 participants
 * Last reply from: [NikkiCasa](https://wordpress.org/support/users/nikkicasa/)
 * Last activity: [10 years, 1 month ago](https://wordpress.org/support/topic/array_map-error/page/2/#post-6881475)
 * Status: resolved