Support » Plugin: My Calendar » [Plugin: My Calendar] Bug in mc_select_category function

  • Resolved akhilstanislavose

    (@akhilstanislavose)


    I was using the upcoming events widget to display events from a single category and and it just did not work. I searched the support forum and nobody have reported any issues regarding category trouble in upcoming widgets. So I did some debugging and found a simple bug in the code.

    my-calendar-limits.php, line 10
    if ( $category == 'all' || strpos( $category, "all" ) !== false ) {

    if the category is ‘Football’ or ‘Baseball’ or any other word with ‘ball’ as a substring, the condition will pass while it should not.

    this is how I fixed it.
    if ( preg_match('/^all$|^all,|,all$|,all,/i', $category) > 0 ) {

    http://wordpress.org/extend/plugins/my-calendar/

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘[Plugin: My Calendar] Bug in mc_select_category function’ is closed to new replies.