• Resolved joneiseman

    (@joneiseman)


    I’m seeing the following warning message when using php 7.2:
    Warning: Use of undefined constant last_com – assumed ‘last_com’ (this will throw an Error in a future version of PHP) in
    /home/class211/public_html/wp-content/plugins/cache-control/cache-control.php on line 261
    Looks like it should be $last_com on that line rather than last_com.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter joneiseman

    (@joneiseman)

    Here’s how I changed the file (starting at line 259) to get it to work:

            if ( !empty($last_com) ) {
                $last_com = new DateTime( $last_com[0]->comment_date );
                $date_mod = max( array( $date_mod, $last_com ) );
            }
    
    Plugin Author Dan

    (@geekysoft)

    Thanks for reporting this issue. It’ll be resolved in the next release.

    Thread Starter joneiseman

    (@joneiseman)

    I see you fixed line 261 in the new release but the other problem is still there. on line 260 (it should be $last_com[0]->comment_date instead of $last_com->comment_date).

    Thanks,
    Jon

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘warning message in php 7.2’ is closed to new replies.