Problem/Motivation

TermInterface::getWeight has a documented return type of int, but it actually returns strings.

Steps to reproduce

Call the method.

Proposed resolution

Two possibilities:

  • Cast the return value to an integer and remove int castings of the method result throughout core
  • Change the return type to string

Issue fork drupal-3317758

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

DieterHolvoet created an issue. See original summary.

DieterHolvoet’s picture

Status: Active » Needs review
joachim’s picture

Status: Needs review » Reviewed & tested by the community

LGTM.

  • catch committed 6f85579 on 10.0.x
    Issue #3317758 by DieterHolvoet: The return type of TermInterface::...
  • catch committed 8fb7236 on 10.1.x
    Issue #3317758 by DieterHolvoet: The return type of TermInterface::...

  • catch committed e2064da on 9.5.x
    Issue #3317758 by DieterHolvoet: The return type of TermInterface::...
catch’s picture

Version: 10.1.x-dev » 9.5.x-dev
Status: Reviewed & tested by the community » Fixed

Committed/pushed to 10.1.x and cherry-picked back through to 9.5.x, thanks!

Status: Fixed » Closed (fixed)

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