I'm trying to preprocess my variable array in drupal 8, But it's not working well.I'm checked with the Bartik theme also, But getting the same error here. When I'm trying to print the variable array its giving a blank page result. How can I preprocess my variable array for a node template?
`function bartik_preprocess_node(&$variables) { // Remove the "Add new comment" link on teasers or when the comment form is // displayed on the page. if ($variables['teaser'] || !empty($variables['content']['comments']['comment_form'])) { unset($variables['content']['links']['comment']['#links']['comment-add']); } print_r($variables); }`
This is the function I'm tried to checkout the issue in bartik theme.