Fix render factory handling of multiple items

Created on 19 May 2023, over 1 year ago
Updated 18 January 2024, about 1 year ago

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.

πŸ› Bug report
Status

RTBC

Version

2.11

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States lisastreeter

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024