Adding attributes with hook_node_view_alter I'm trying to modify the "Add new comment" link in certain nodes, and for this I'm using hook_node_view_alter like this:

function example_node_view_alter(&amp;$build) {
//    $build['links']['comment']['#links']['comment-add']['attributes']['class'] = 'nice small radius blue button';
      $build['links']['comment']['#links']['comment-add']['title'] = t('Add a review');
}


The commented line is causing trouble though,... since the array doesn't have a 'class' attribute. If I just add it to the array like that, every time I clic on the "add a review" link, the website isn't rendered properly... so how can I add it without ruining everyhting else?
The class property is an array so you need to initialise it like this:

$build['links']['comment']['#links']['comment-add']['attributes']['class'] = array(
  'nice',
  'small',
  'radius', 
  'blue',
  'button'
);