Additional Misc PHP Errors: Undefined index…
-
We run WP_DEBUG in logging mode. PHP 7.0.
The following PHP errors (NOTICE level, but still an error) show up regularly in the logs:
PHP Notice: Undefined index: comment_post_ID in {DOCUMENT_ROOT}/wp-content/plugins/wp-super-cache/wp-cache-phase2.php on line 1270 PHP Notice: Undefined index: delete_all in {DOCUMENT_ROOT}/wp-content/plugins/wp-super-cache/wp-cache-phase2.php on line 1300 PHP Notice: Undefined index: delete_all2 in {DOCUMENT_ROOT}/wp-content/plugins/wp-super-cache/wp-cache-phase2.php on line 1300It’s an easy fix.
Change line 1270 from
$postid = $comment['comment_post_ID'];to
$postid = ( !empty( $comment['comment_post_ID'] ) ) ? $comment['comment_post_ID'] : '';Change line 1300 from
} elseif ( $_GET[ 'delete_all' ] != 'Empty Trash' && $_GET[ 'delete_all2' ] != 'Empty Spam' ) {to
} elseif ( isset( $_GET['delete_all'], $_GET['delete_all2'] ) && $_GET['delete_all'] !== 'Empty Trash' && $_GET['delete_all2'] !== 'Empty Spam' ) {Thanks!
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
The topic ‘Additional Misc PHP Errors: Undefined index…’ is closed to new replies.