PHP 8.1 Unsupported operand types line 1991 theme.inc

Created on 13 December 2022, about 2 years ago
Updated 25 August 2023, over 1 year ago

It appears PHP 8.1 upgrade has caused

Unsupported operand types: string - string in _field_multiple_value_form_sort_helper() (line 1991 of core/includes/theme.inc)

Which delivers an error page when saving a commerce product

I changed line 1991 from

return $a_weight - $b_weight;

TO

return (int) $a_weight - $b_weight;

which appears to have fixed the issue and allows a save of the commerce products

Perhaps someone can test this or look at the issue for a fix to core

I am running Drupal 9.4.9 and PHP 8.1 and latest version of Drupaql Commerce Core

🐛 Bug report
Status

Closed: outdated

Version

9.5

Component
Theme 

Last updated 38 minutes ago

Created by

🇺🇸United States bobburns

Live updates comments and jobs are added and updated live.
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 smustgrave

    Since there hasn't been a follow up to #3 going to close for now

    If still a bug please reopen updating issue summary with steps to reproduce.

    Thanks!

Production build 0.71.5 2024