diff --git a/changelog/fix-deprecation-notice-on-reports-screen b/changelog/fix-deprecation-notice-on-reports-screen new file mode 100644 index 0000000000..79e776a62c --- /dev/null +++ b/changelog/fix-deprecation-notice-on-reports-screen @@ -0,0 +1,4 @@ +Significance: patch +Type: fixed + +Deprecation notice on the reports screen when using PHP 8.1 diff --git a/includes/class-sensei-analysis-lesson-list-table.php b/includes/class-sensei-analysis-lesson-list-table.php index 48c42e7d9e..41b96c7a87 100755 --- a/includes/class-sensei-analysis-lesson-list-table.php +++ b/includes/class-sensei-analysis-lesson-list-table.php @@ -285,7 +285,7 @@ protected function get_row_data( $item ) { $escaped_column_data = array(); foreach ( $column_data as $key => $data ) { - $escaped_column_data[ $key ] = wp_kses_post( $data ); + $escaped_column_data[ $key ] = $data ? wp_kses_post( $data ) : $data; } return $escaped_column_data;