• WeePee

    (@weepee)


    Hi!

    I get this PHP warning in my debug.log all the time:

    PHP Warning: Cannot modify header information - headers already sent in /var/www/coaching_test/wp-content/advanced-cache.php on line 218

    This is the code that causes it:

    217 function hyper_cache_header($value) {
    218     header('X-Hyper-Cache: ' . $value, false);
    219 }

    My PHP version: PHP 7.2.24-0ubuntu0.18.04.7

Viewing 1 replies (of 1 total)
  • Hi there,

    You can try to fix yourself while waiting for the author to respond or do the updates.

    Before:

    function hyper_cache_header($value) {
         header('X-Hyper-Cache: ' . $value, false);
     }
    

    After:

    function hyper_cache_header($value) {
        if (!headers_sent()) {
            header('X-Hyper-Cache: ' . $value, false);
        }
    }
    

    File: wp-content/plugins/hyper-cache/advanced-cache.php
    Line: 217

    On the hyper cache panel, click save to overwrite the wp-content/advanced-cache.php file.

    Hope this will help.

    Thanks.

Viewing 1 replies (of 1 total)
  • The topic ‘PHP Warning’ is closed to new replies.