$items may not be an array

Created on 29 May 2020, about 4 years ago
Updated 22 January 2023, over 1 year ago

In certain circumstances the $items variable in uc_order_line_item_add() may not be an array, so with PHP 7.2 the count($items) check will throw an error.

πŸ› Bug report
Status

Closed: works as designed

Version

3.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States DamienMcKenna NH, USA

Live updates comments and jobs are added and updated live.
  • PHP 7.2

    The issue particularly affects sites running on PHP version 7.2.0 or later.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡ΊπŸ‡ΈUnited States TR Cascadia

    Well as I explained in #6, the error is not in Ubercart, but is in some other module that improperly modifies $items inside of a hook_uc_line_item_data_alter() call.

    Because no further information has been given about how to reproduce the error or which other module (contrib or custom) is being used, I can't help with this.

Production build 0.69.0 2024