Skip to content

When theme_item_list is encountered it should be upgraded to use theme() helper function #95

Description

@izmeez

When coder_upgrade encounters Drupal 7 code with theme_item_list it leaves it unchanged. For example:

   return theme_item_list(
    array(
    'items' => $items,
    'title' => '',
    'type' => 'ul',
    'attributes' => array(),
    )
  );
}

This results in a warning:

Warning: Undefined array key "wrapper_attributes" in theme_item_list() (line 2434 of core\includes\theme.inc).

This is because in Backdrop new parameters have been added to theme_item_list().

The proper upgrade is to use the helper function theme() and changing the code to:

  return theme('item_list',
    array(
      'items' => $items,
      'title' => '',
      'type' => 'ul',
      'attributes' => array(),
    )
  );
}

Can coder_upgrade make this change or provide a note to alert what needs to be changed?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions