WordPress.org

Ready to get started?Download WordPress

Forums

Event Calendar 3 for PHP 5.3
undefined index and variable notices (5 posts)

  1. sarneil
    Member
    Posted 1 year ago #

    I've got the current release of EC3-for-php53 running in WP 3.3.2 in PHP 5.2 (upgrading from the old EC3 running in WP2.6 on PHP 4.x).

    I get the following php notices when I set WP_DEBUG to true in my wp-config.php file.

    Notice: Undefined index: ec3_before in /etcl/www/wordpress/wp-content/plugins/event-calendar-3-for-php-53/eventcalendar3.php on line 993

    Notice: Undefined variable: a in /etcl/www/wordpress/wp-content/plugins/event-calendar-3-for-php-53/eventcalendar3.php on line 994

    Those are being thrown by the last two lines of this block from eventcalendar3.php

    if( !empty($wp_query->query_vars['ec3_after']) )
    
          $a=$wp_query->query_vars['ec3_after'];
    
      else if( !empty($wp_query->query_vars['ec3_from']) )
    
          $a=$wp_query->query_vars['ec3_from'];
    
      $b=$wp_query->query_vars['ec3_before'];
    
      if( $a=='today' )

    I've been unable to figure out how to ensure those entries in the query_vars array have sensible values. Has anyone else had this behaviour? Suggest a fix to this apparent bug?

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

  2. Marventus
    Member
    Posted 1 year ago #

    Hi sarneil,

    Your problem is actually phrased in your own post:
    The new plugin version is for PHP version 5.3, and you claimed you are running version 5.2 on your server.
    Try to rollback to the older version and the plugin should work as expected.

    Cheers!

  3. sarneil
    Member
    Posted 1 year ago #

    Thanks Marventus
    I wondered about a possible php incompatibility too.
    The EC3 site says

    Requires: 1.5 or higher
    Compatible up to: 2.7

    The EC3forPHP53 says

    Requires: 1.5 or higher
    Compatible up to: 3.0.5

    Which made me think there would be more compatibility issues with the older version compared to the newer one. I will try the EC3 release, see what happens and report back.

  4. sarneil
    Member
    Posted 1 year ago #

    Just installed and activated the EC3 plugin and I'm getting the same php notices on the web page on the site:

    Notice: Undefined index: ec3_before in /wordpress/wp-content/plugins/event-calendar/eventcalendar3.php on line 511
    
    Notice: Undefined variable: a in /wordpress/wp-content/plugins/event-calendar/eventcalendar3.php on line 512

    I'm also getting a number of php notices (different ones than those quoted above) definitely to do with EC3 in the wp-admin pages. I didn't get those with EC3forPHP53. As both versions produce the original Notices and the EC3 produces more in the admin interface, it looks like EC3forPHP53 is the better code for my platform. In either case, I'm getting the php notices.

  5. Marventus
    Member
    Posted 1 year ago #

    Those requirements you quoted are for the WP version, not the PHP.
    Try this. In your root folder, create a php file called phpinfo.php or whatever you prefer, paste this code inside:

    <?php
    phpinfo();
    ?>

    and open it via your favorite browser (i.e., yourdomain.com/phpinfo.php).
    In there you will find the PHP version your hosting server is running. LMK which one it is.
    Once you are done using it, delete the phpinfo.php file for security.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic