WordPress.org

Ready to get started?Download WordPress

Forums

WP Statistics
[resolved] two more (possible) bugs (2 posts)

  1. naglis
    Member
    Posted 10 months ago #

    Hi again,
    I used WordPress 3.6.1 in debug mode, WP-Statistics 3.2 all running on PHP 5.4.19.
    I get these two notices in the Settings page of WP-Statistics:

    1. Undefined offset: 0 in wp-content/plugins/wp-statistics/includes/functions/functions.php on line 58

    2. Notice: Undefined index: type in wp-content/plugins/wp-statistics/wp-statistics.php on line 174

      Notice: Undefined index: type in wp-content/plugins/wp-statistics/wp-statistics.php on line 187

      Notice: Undefined index: type in wp-content/plugins/wp-statistics/wp-statistics.php on line 198

    I fixed the first problem by changing the 33 line of includes/functions/functions.php to:

    $result[0] = array_sum( $wpdb->get_col("SELECT `visit` FROM {$table_prefix}statistics_visit WHERE `last_counter` = '{$s->Current_Date('Y-m-d', -1)}'") );

    I fixed the second problem by checking whether $_GET['type'] is set before accessing it's value on lines 174, 187, 198 of wp-statistics.php

    I'm no PHP guru and I think you'll have better solutions to these problems. I only share my solutions to help you spot possible problems faster.

    Thank you for this great plugin.

    Regards,
    Naglis

    http://wordpress.org/plugins/wp-statistics/

  2. Greg Ross
    Member
    Plugin Author

    Posted 3 months ago #

    All know debug warnings have been fixed is recent releases, closing topic.

Reply

You must log in to post.

About this Plugin

About this Topic

Tags