Problem/Motivation

Deprecated function: Using null as an array offset is deprecated, use an empty string instead in entity_usage_views_data_alter() (line 47 of modules/contrib/entity_usage/entity_usage.views.inc).
entity_usage_views_data_alter() (Line: 460)
Drupal\Core\Extension\ModuleHandler->alter() (Line: 88)
Drupal\hook_event_dispatcher\HookEventDispatcherModuleHandler->alter() (Line: 228)

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

phoang created an issue. See original summary.

anupamkhosla1993@gmail.com’s picture

I get similar errors after installing. I think new php has deprecated a lot of functions used by this module:

Status message
Module Entity Usage has been installed. Configure related permissions.
One translation file imported. 0 translations were added, 11 translations were updated and 0 translations were removed.
The configuration was successfully updated. There are 147 configuration objects updated.

Error message
Deprecated function: Using null as an array offset is deprecated, use an empty string instead in entity_usage_views_data_alter() (line 47 of modules/contrib/entity_usage/entity_usage.views.inc).
Deprecated function: Using null as an array offset is deprecated, use an empty string instead in entity_usage_views_data_alter() (line 47 of modules/contrib/entity_usage/entity_usage.views.inc).
Deprecated function: Using null as an array offset is deprecated, use an empty string instead in entity_usage_views_data_alter() (line 47 of modules/contrib/entity_usage/entity_usage.views.inc).
Deprecated function: Using null as an array offset is deprecated, use an empty string instead in entity_usage_views_data_alter() (line 47 of modules/contrib/entity_usage/entity_usage.views.inc).
Deprecated function: Using null as an array offset is deprecated, use an empty string instead in entity_usage_views_data_alter() (line 47 of modules/contrib/entity_usage/entity_usage.views.inc).
Deprecated function: Using null as an array offset is deprecated, use an empty string instead in entity_usage_views_data_alter() (line 47 of modules/contrib/entity_usage/entity_usage.views.inc).
Deprecated function: Using null as an array offset is deprecated, use an empty string instead in entity_usage_views_data_alter() (line 47 of modules/contrib/entity_usage/entity_usage.views.inc).
Deprecated function: Using null as an array offset is deprecated, use an empty string instead in entity_usage_views_data_alter() (line 47 of modules/contrib/entity_usage/entity_usage.views.inc).
Deprecated function: Using null as an array offset is deprecated, use an empty string instead in entity_usage_views_data_alter() (line 47 of modules/contrib/entity_usage/entity_usage.views.inc).
Deprecated function: Using null as an array offset is deprecated, use an empty string instead in entity_usage_views_data_alter() (line 47 of modules/contrib/entity_usage/entity_usage.views.inc).
Deprecated function: Using null as an array offset is deprecated, use an empty string instead in entity_usage_views_data_alter() (line 47 of modules/contrib/entity_usage/entity_usage.views.inc).
Deprecated function: Using null as an array offset is deprecated, use an empty string instead in entity_usage_views_data_alter() (line 47 of modules/contrib/entity_usage/entity_usage.views.inc).
Deprecated function: Using null as an array offset is deprecated, use an empty string instead in entity_usage_views_data_alter() (line 47 of modules/contrib/entity_usage/entity_usage.views.inc).
Deprecated function: Using null as an array offset is deprecated, use an empty string instead in entity_usage_views_data_alter() (line 47 of modules/contrib/entity_usage/entity_usage.views.inc).
Deprecated function: Using null as an array offset is deprecated, use an empty string instead in entity_usage_views_data_alter() (line 47 of modules/contrib/entity_usage/entity_usage.views.inc).
Deprecated function: Using null as an array offset is deprecated, use an empty string instead in entity_usage_views_data_alter() (line 47 of modules/contrib/entity_usage/entity_usage.views.inc).
Deprecated function: Using null as an array offset is deprecated, use an empty string instead in entity_usage_views_data_alter() (line 47 of modules/contrib/entity_usage/entity_usage.views.inc).
Deprecated function: Using null as an array offset is deprecated, use an empty string instead in entity_usage_views_data_alter() (line 47 of modules/contrib/entity_usage/entity_usage.views.inc).
Deprecated function: Using null as an array offset is deprecated, use an empty string instead in entity_usage_views_data_alter() (line 47 of modules/contrib/entity_usage/entity_usage.views.inc).
Deprecated function: Using null as an array offset is deprecated, use an empty string instead in entity_usage_views_data_alter() (line 47 of modules/contrib/entity_usage/entity_usage.views.inc).
Deprecated function: Using null as an array offset is deprecated, use an empty string instead in entity_usage_views_data_alter() (line 47 of modules/contrib/entity_usage/entity_usage.views.inc).
Deprecated function: Using null as an array offset is deprecated, use an empty string instead in entity_usage_views_data_alter() (line 47 of modules/contrib/entity_usage/entity_usage.views.inc).
Deprecated function: Using null as an array offset is deprecated, use an empty string instead in entity_usage_views_data_alter() (line 47 of modules/contrib/entity_usage/entity_usage.views.inc).
Deprecated function: Using null as an array offset is deprecated, use an empty string instead in entity_usage_views_data_alter() (line 47 of modules/contrib/entity_usage/entity_usage.views.inc).
Deprecated function: Using null as an array offset is deprecated, use an empty string instead in entity_usage_views_data_alter() (line 47 of modules/contrib/entity_usage/entity_usage.views.inc).
phoang’s picture

Did you apply the patch? It should fix the error message.

alexpott made their first commit to this issue’s fork.

alexpott’s picture

Status: Needs review » Reviewed & tested by the community

Thanks for reporting this @phoang - I've slightly tweaked your MR to clean up some confusing code that didn't ever run anyway.

  • alexpott committed e39771e9 on 5.x
    fix: #3571584 Using null as an array offset is deprecated PHP 8.5
    
    By:...

  • alexpott committed e30def35 on 8.x-2.x
    fix: #3571584 Using null as an array offset is deprecated PHP 8.5
    
    By:...
alexpott’s picture

Status: Reviewed & tested by the community » Fixed

Merged this to 8.x-2.x and 5.x

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.