Title: [Plugin: Calendar Posts] warning when saving post
Last modified: August 20, 2016

---

# [Plugin: Calendar Posts] warning when saving post

 *  [alroe](https://wordpress.org/support/users/alroe/)
 * (@alroe)
 * [14 years, 12 months ago](https://wordpress.org/support/topic/plugin-calendar-posts-warning-when-saving-post/)
 * The plugin seems simple and elegangt, but I get a warning when saving post after
   having chosen dates in Calender:
 * Warning: sort() expects parameter 2 to be long, string given in /home/xx/wp-content/
   plugins/calendar-posts/calendar-posts.php on line 138
 * Warning: sort() expects parameter 2 to be long, string given in /home/xx/wp-content/
   plugins/calendar-posts/calendar-posts.php on line 138
 * Warning: Cannot modify header information – headers already sent by (output started
   at /home/xx/wp-content/plugins/calendar-posts/calendar-posts.php:138) in /home/
   xx/wp-includes/pluggable.php on line 897
 * Theme suffusion
    Other plugins installed: alphabetical list, list category posts,
   restricted site access
 * [http://wordpress.org/extend/plugins/calendar-posts/](http://wordpress.org/extend/plugins/calendar-posts/)

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

 *  [zowieguy](https://wordpress.org/support/users/zowieguy/)
 * (@zowieguy)
 * [14 years, 11 months ago](https://wordpress.org/support/topic/plugin-calendar-posts-warning-when-saving-post/#post-2097991)
 * I am getting the same error with this plugin when publishing post:
 * >  Warning: sort() expects parameter 2 to be long, string given in /home3/xxxxx/
   > public_html/wp-content/plugins/calendar-posts/calendar-posts.php on line 138
   > Warning: sort() expects parameter 2 to be long, string given in /home3/xxxxx/
   > public_html/wp-content/plugins/calendar-posts/calendar-posts.php on line 138
   > Warning: Cannot modify header information – headers already sent by (output
   > started at /home3/xxxxx/public_html/wp-content/plugins/calendar-posts/calendar-
   > posts.php:138) in /home3/xxxxx/public_html/wp-includes/pluggable.php on line
   > 897
 * Any idea how to fix this because this plugin is just what i was looking for.
   
   Thanks’
 * [http://wordpress.org/extend/plugins/calendar-posts/](http://wordpress.org/extend/plugins/calendar-posts/)
 *  [zowieguy](https://wordpress.org/support/users/zowieguy/)
 * (@zowieguy)
 * [14 years, 11 months ago](https://wordpress.org/support/topic/plugin-calendar-posts-warning-when-saving-post/#post-2097994)
 * Still No Solution…
 * I was using three different plugins to accomplish an “event” site.
 * 1. Calendar Posts
    2. The Future is Now 3. AJAX Calendar Future POSTS
 * First off.. I realized that I didn’t need “AJAX Calendar Future POSTS” because
   is was kinda redundant with the “The Future is Now” plugin. The stock WP Calendar
   will show future posts with “The Future is Now” (I wasn’t sure if it would at
   first, but it does).
 * So, with that out of the way… I can create a future post without any error if
   I just change the post date and do not touch the “Calendar Posts” calendar. But,
   it will not show in the CP widget.
 * If I then go back to edit post and try to use the CP calendar, i get the same
   error when updating.
 * I will keep trying to figure this out.
 *  [zowieguy](https://wordpress.org/support/users/zowieguy/)
 * (@zowieguy)
 * [14 years, 11 months ago](https://wordpress.org/support/topic/plugin-calendar-posts-warning-when-saving-post/#post-2097995)
 * Well it seems that even though I am still getting the error, the post is published
   anyways.
    It’s kind of a pain going around the error…. but as long as the post
   is there i guess I can deal with it until it gets fixed.
 * Here is the site I am working on: [http://www.concretestreet.net/ ](http://www.concretestreet.net)
 * Cheers’
 *  Plugin Author [swedish boy](https://wordpress.org/support/users/swedish-boy/)
 * (@swedish-boy)
 * [14 years, 10 months ago](https://wordpress.org/support/topic/plugin-calendar-posts-warning-when-saving-post/#post-2098010)
 * Thanks for the feedback.
    I will fix this in the next update. This is reproduced
   because of faulty set SORT_NUMERIC, constant. I have set it as a string by misstake.
   If you want a fix already now you can search the file for SORT_NUMERIC and remove
   the quotes on row 138.
 *     ```
       sort($datum_a, 'SORT_NUMERIC');
   
       // should be changed to
   
       sort($datum_a, SORT_NUMERIC);
       ```
   
 * Cheers
 *  [zowieguy](https://wordpress.org/support/users/zowieguy/)
 * (@zowieguy)
 * [14 years, 10 months ago](https://wordpress.org/support/topic/plugin-calendar-posts-warning-when-saving-post/#post-2098012)
 * Fantastic.. worked like a charm.
 * Thanks’ Swedish..
 * Cheers’
 *  [ReneeRox](https://wordpress.org/support/users/reneerox/)
 * (@reneerox)
 * [14 years, 4 months ago](https://wordpress.org/support/topic/plugin-calendar-posts-warning-when-saving-post/#post-2098061)
 * This still seems to be an issue. I will try the fix error that you mentioned.
 *  [ReneeRox](https://wordpress.org/support/users/reneerox/)
 * (@reneerox)
 * [14 years, 4 months ago](https://wordpress.org/support/topic/plugin-calendar-posts-warning-when-saving-post/#post-2098062)
 * Ok, the fix worked. thanks!

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

The topic ‘[Plugin: Calendar Posts] warning when saving post’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/calendar-posts.svg)
 * [Calendar Posts](https://wordpress.org/plugins/calendar-posts/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/calendar-posts/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/calendar-posts/)
 * [Active Topics](https://wordpress.org/support/plugin/calendar-posts/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/calendar-posts/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/calendar-posts/reviews/)

## Tags

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

 * 7 replies
 * 4 participants
 * Last reply from: [ReneeRox](https://wordpress.org/support/users/reneerox/)
 * Last activity: [14 years, 4 months ago](https://wordpress.org/support/topic/plugin-calendar-posts-warning-when-saving-post/#post-2098062)
 * Status: not resolved