• Resolved ngrudev

    (@ngrudev)


    Hi,

    In debug log I have multiple lines of this PHP notice:

    [22-Feb-2017 06:00:11 UTC] PHP Notice: Undefined variable: supercache_home in /home/lugabglj/public_html/bg_wp/wp-content/plugins/wp-super-cache/wp-cache-phase2.php on line 1143

    Thank you,

Viewing 8 replies - 1 through 8 (of 8 total)
  • I had the same issue.

    Upon going through the code in wp-cache-phase2.php I noticed this:

    wp_cache_debug( “wp_cache_post_id_gc clearing cache in {$supercache_home}page/.” );
    $supercache_home = get_supercache_dir();
    prune_super_cache( $supercache_home . ‘page/’, true );

    After moving the line: $supercache_home = get_supercache_dir();
    to the top of this section I now no longer get the error.

    Hope this helps.

    I had the same issue.
    But i don’t feel safe if i’ll change the core of plugin.
    In my case the issue occurred when save menus in admin section.

    Yes, it’s a simple fix. The lines are out of order.

    In wp-cache-phase2.php line 1143, change:

    wp_cache_debug( "wp_cache_post_id_gc clearing cache in {$supercache_home}page/." );
    $supercache_home = get_supercache_dir();
    prune_super_cache( $supercache_home . 'page/', true );

    to

    $supercache_home = get_supercache_dir();
    wp_cache_debug( "wp_cache_post_id_gc clearing cache in {$supercache_home}page/." );
    prune_super_cache( $supercache_home . 'page/', true );
    • This reply was modified 7 years, 1 month ago by sintro.
    • This reply was modified 7 years, 1 month ago by sintro.
    paul_williams

    (@paul_williamsbtinternetcom)

    Excellent, thanks Sintro…

    Thread Starter ngrudev

    (@ngrudev)

    works for me also. 10x !

    girlknowstech

    (@girlknowstech)

    Hi,

    I just did this and my dev environment crashed… Anyone else?

    But the error wasn’t happening in the dev environment when I was saving my menus.
    Maybe if I try the fix on the production environment where the error is happening it won’t make the site crash, but it’s scary to do…

    Thanks

    hello!

    after fixing i have another problem:
    blog/wp-content/plugins/wp-super-cache/wp-cache-phase2.php on line 1648

    Inspecting the line 1648 in wp-cache-phase2.php:
    add_action( ‘gc_cache’, ‘wpsc_timestamp_cache_update’, 10, 2 );

    Everything was perfect with previous version of wp-super-cache.

    Wordpress doesnt work ( Help !

    @alen2000 – are you using an old version of WordPress? Try the development version which fixes this problem.

    https://odd.blog/y/2o

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘PHP NOtice in debug log in wp-cache-phase2.php on line 1143’ is closed to new replies.