• Resolved ZjanPreijde

    (@zjanpreijde)


    Hi Sudar,

    It’s a tiny issue, but when using it in my development environment, I get 6 notices like Notice: Undefined index: emaillog_page in /home/……/wp-content/plugins/email-log/email-log.php on line 194 because you’re using intval($_GET[’emaillog_page’]) without checking isset($_GET[’emaillog_page’]).

    Again, it’s a tiny issue, but easy to avoid.

    But thanks for a very nice plugin, I was wondering (as a new user) where WP left it’s sent emails, but apparantly it doesn’t.

    Greetz, Zjan

    http://wordpress.org/extend/plugins/email-log/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Sudar Muthu

    (@sudar)

    Nice to know that you like the Plugin.

    If you can list down all the 6 notices, I will fix it as part of the next release.

    Thread Starter ZjanPreijde

    (@zjanpreijde)

    Hi Sudar,

    This is how I changed your code to avoid the notices:

    function settings_page() {
            global $wpdb;
            global $text_direction;
    
            $base_name = plugin_basename('email-log');
            $base_page = 'admin.php?page='.$base_name;
    
    //      $email_log_page            = intval($_GET['emaillog_page']);
            $email_log_page            = (isset($_GET['emaillog_page'])) ? intval($_GET['emaillog_page']) : 0;
    //      $emaillogs_filterid        = trim(addslashes($_GET['id']));
            $emaillogs_filterid        = (isset($_GET['id'])) ? trim(addslashes($_GET['id'])) : "" ;
    //      $emaillogs_filter_to_email = trim(addslashes($_GET['to_email']));
            $emaillogs_filter_to_email = (isset($_GET['to_email'])) ? trim(addslashes($_GET['to_email'])) : "" ;
    //      $emaillogs_filter_subject  = trim(addslashes($_GET['subject']));
            $emaillogs_filter_subject  = (isset($_GET['subject'])) ? trim(addslashes($_GET['subject'])) : "" ;
    //      $emaillog_sort_by          = trim($_GET['by']);
            $emaillog_sort_by          = (isset($_GET['by'])) ? trim($_GET['by']) : "";
            $emaillog_sortby_text      = '';
    //      $emaillog_sortorder        = trim($_GET['order']);
            $emaillog_sortorder        = (isset($_GET['order'])) ? trim($_GET['order']) : "" ;
            $emaillog_sortorder_text   = '';
            $email_log_perpage         = intval($this->get_per_page());
            $emaillog_sort_url         = '';

    Grtz, Zjan

    http://wordpress.org/extend/plugins/email-log/

    Plugin Author Sudar Muthu

    (@sudar)

    Thanks. I fixed it in v0.8 of the Plugin.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Plugin: Email Log] Notices undefined indices’ is closed to new replies.