Warning: get array index on null in isUpdatingInProgress function

Created on 4 December 2023, about 1 year ago
Updated 25 January 2024, 11 months ago

Using drupal 10 on php 8.1 there seems to be an issue where a warning is given in `isUpdatingInProgress` since getState is mixed there is a posibility for state to be null. This case seems to not be catched by the current code.

I suggest that the is check gives a default value when state is not available.

  private static function isUpdatingInProgress()
  {
    if (!self::getState()) {
      return false;
    }
    return (bool) self::getState()['updating_in_progress'];
  }
🐛 Bug report
Status

Fixed

Version

9.3

Component

Code

Created by

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

Comments & Activities

Production build 0.71.5 2024