Support » Plugin: Event Calendar 3 for PHP 5.3 » PHP 5.4 and EC3 3.1.4

  • In case you are using PHP5.4 and EC3 3.1.4 you might have an issue with some of the functions it has.

    PHP 5.4 (think in 5.3 too) removed the usage of passing arguments to functions by reference.

    EC3 has at least 6 functions that make use of these and need to be modified;
    ec3_fitler_the_posts_where(),
    ec3_filter_posts_join(),
    ec3_filter_posts_orderby(),
    ec3_filter_posts_groupby,
    ec3_filter_fields(),
    ec3_filter_the_content()

    Just remove the ‘&’ reference notation and the plugin will continue to work correctly.

    Oh, now that I look the 3.1.5 release fixes the issue of PHP 5.3. Leaving this here incase someone might find this post useful.

    https://wordpress.org/plugins/event-calendar-3-for-php-53/

Viewing 1 replies (of 1 total)
  • I needed to change in 2 files, and after that the plugin works fine with WP 4.0 … removing & from below …

    In date.php:
    Line 231: function ec3_mysql2date(&$mysqldate)
    Line 239: function ec3_dayid2php(&$id)

    In eventcalendar.php:
    Line 135: function ec3_filter_posts_where(&$where)
    Line 228: function ec3_filter_posts_join(&$join)
    Line 242: function ec3_filter_posts_orderby(&$orderby)
    Line 266: ​function ec3_filter_posts_groupby(&$groupby)
    Line 281: function ec3_filter_posts_fields(&$fields)
    Line 539: function ec3_filter_the_content(&$post_content)

Viewing 1 replies (of 1 total)
  • The topic ‘PHP 5.4 and EC3 3.1.4’ is closed to new replies.