Undefined variable warnings in getValuefromSectionStorage function $bundle and $entity_type

Created on 19 March 2024, 9 months ago
Updated 9 July 2024, 5 months ago

Problem/motivation

The getValuefromSectionStorage function in the codebase is throwing 'Undefined variable' warnings for $bundle and $entity_type in certain cases. This can lead to confusion and potential issues during development and debugging.

Steps to reproduce

  1. Invoke the getValuefromSectionStorage function with specific inputs.
  2. Trigger the code path where the $bundle and $entity_type variables are accessed.
  3. Observe the 'Undefined variable' warnings for $bundle and $entity_type.

Proposed resolution

To resolve the 'Undefined variable' warnings, initialize the $bundle and $entity_type variables to NULL at the beginning of the function. This will prevent the warnings from being triggered when the variables are accessed later in the function.

πŸ› Bug report
Status

Fixed

Version

3.0

Component

Code

Created by

πŸ‡§πŸ‡¬Bulgaria ovanes Sofia

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

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

Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024