Problem/Motivation

The RendererFactory class has a comment documenting how multiple items (in an array) should be handled:

// If we get an array or something, just look at the first one.

However, the code is looking at the last item instead of the first:

    if (is_array($item)) {
      $item = array_pop($item);
    }

Proposed resolution

Use the php reset array function instead of array_pop.

CommentFileSizeAuthor
#2 3361528-2.patch560 byteslisastreeter
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:

Comments

lisastreeter created an issue. See original summary.

lisastreeter’s picture

StatusFileSize
new560 bytes

Patch for fix.

lisastreeter’s picture

Status: Active » Needs review
grota’s picture

Status: Needs review » Reviewed & tested by the community

we are using the patch and it makes sense and is simple, incidentally this is also required for http://drupal.org/project/commerce_order_document moving to RTBC

jannakha made their first commit to this issue’s fork.

vladimiraus made their first commit to this issue’s fork.

vladimiraus’s picture

Version: 8.x-2.11 » 8.x-2.x-dev
Status: Reviewed & tested by the community » Fixed

Fixed and merged. Thank you.

Status: Fixed » Closed (fixed)

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