• Resolved rfs1970

    (@rfs1970)


    Hi There,

    I was getting a lot of errors in my server related to this plugin, ie:

    [17-Feb-2014 22:17:41 UTC] PHP Notice: Undefined variable: commentCount in /var/www/wp-content/plugins/google-sitemap-generator/sitemap-core.php on line 1913
    [17-Feb-2014 22:17:41 UTC] PHP Stack trace:
    [17-Feb-2014 22:17:41 UTC] PHP 1. {main}() /var/www/wp-cron.php:0
    [17-Feb-2014 22:17:41 UTC] PHP 2. do_action_ref_array() /var/www/wp-cron.php:100
    [17-Feb-2014 22:17:41 UTC] PHP 3. call_user_func_array() /var/www/wp-includes/plugin.php:507
    [17-Feb-2014 22:17:41 UTC] PHP 4. GoogleSitemapGeneratorLoader::CallBuildSitemap() /var/www/wp-includes/plugin.php:507
    [17-Feb-2014 22:17:41 UTC] PHP 5. GoogleSitemapGenerator->BuildSitemap() /var/www/wp-content/plugins/google-sitemap-generator/sitemap.php:172

    In sitemap-core.php, line 1913 you have:
    $prioProvider = new $providerClass($commentCount,$postCount);

    As this variable wasn’t been created, I’ve added the following line (~1872):
    $commentCount = intval($wpdb->get_var(“SELECT SUM(comment_count) AS cnt FROM " . $wpdb->posts . " WHERE “. $where,0,0));

    I would like to know what is your opinion about this fix…
    Cheers

    https://www.ads-software.com/plugins/google-sitemap-generator/

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Server side: php error log’ is closed to new replies.