PHP8.2 compatibility: Deprecated function: Creation of dynamic property i18n_menu_link_translation_set::

Created on 23 March 2024, about 1 year ago
Updated 9 April 2024, about 1 year ago

Problem/Motivation

Deprecated function: Creation of dynamic property i18n_menu_link_translation_set::$created is deprecated in i18n_translation_set->__construct() (line 27 of modules/contrib/i18n/i18n_translation/i18n_translation.inc).

Deprecated function: Creation of dynamic property i18n_menu_link_translation_set::$changed is deprecated in i18n_translation_set->__construct() (line 27 of modules/contrib/i18n/i18n_translation/i18n_translation.inc).

Steps to reproduce

STR:
1. Go to /admin/structure/menu/manage/main-menu/add
2. Fill in the required fields
3. Select any language except 'language neutral'
4. Push Save button
5. Find the created menu link and click on 'translate'
6. Click 'add translation' for any of the available languages
7. Fill in the text field with any value and push 'Save'
8. Observe the deprecation messages

Proposed resolution

Add #[AllowDynamicProperties] to the class i18n_menu_link_translation_set.

🐛 Bug report
Status

Fixed

Version

1.0

Component

Menus

Created by

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

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

Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024