Problem/Motivation

There's an unused call to get_class in core/lib/Drupal/Core/Render/Element/MoreLink.php

  public function getInfo() {
    $class = get_class($this);
    $info = parent::getInfo();
    return array(
      '#title' => $this->t('More'),
      '#theme_wrappers' => array(
        'container' => array(
          '#attributes' => array('class' => array('more-link')),
        ),
      ),
    ) + $info;
  }

Proposed resolution

Remove the extra call.

CommentFileSizeAuthor
#1 2399323-1.patch479 bytespcambra
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

pcambra’s picture

Status: Active » Needs review
FileSize
479 bytes
dawehner’s picture

Status: Needs review » Reviewed & tested by the community

Good spot!

alexpott’s picture

Category: Task » Bug report
Status: Reviewed & tested by the community » Fixed

Dead code is a bug. Zero disruption - committed 835b66b and pushed to 8.0.x. Thanks!

  • alexpott committed 835b66b on 8.0.x
    Issue #2399323 by pcambra: Remove unused get_class call on MoreLink
    

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.