Problem/Motivation

The method is too strict with its parameter typing. It limits view_mode to string only.

Proposed resolution

Remove string as the parameter's type.

This seems like a simple mistake when someone went through and typed all of the parameters for the 3.x version. This parameter isn't typed in 2x and the cheat sheet documents that custom display settings should also be allowed.

CommentFileSizeAuthor
#2 3222014-2.patch829 bytessonfd

Comments

sonfd created an issue. See original summary.

sonfd’s picture

Status: Active » Needs review
StatusFileSize
new829 bytes

Here's a patch that removes that parameter's typing.

chi’s picture

Version: 3.1.1 » 3.x-dev
Category: Feature request » Bug report
Status: Needs review » Reviewed & tested by the community

  • Chi committed 58ca88b on 3.x authored by sonfd
    Issue #3222014 by sonfd: Allow custom display settings for drupal_field...
chi’s picture

Once we drop support for PHP 7 we can make use of union type string|array for this parameter.

Thank you.

chi’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

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