Problem/Motivation

When upgrading to 8.x-4.8 an error can occur when ldap_user is installed. If `ldapUserSyncMappings.drupal` is not an array.

ldap_user.settings:
  ldapUserSyncMappings.drupal
[error]  array_key_exists(): Argument #2 ($array) must be of type array, null given 
[error]  Update failed: ldap_user_update_8408 

Debug Report

Proposed resolution

  $drupal_mapping = $settings->get('ldapUserSyncMappings.drupal');

to

  $drupal_mapping = $settings->get('ldapUserSyncMappings.drupal') ?? [];

Remaining tasks

User interface changes

API changes

Data model changes

Issue fork ldap-3437015

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

bluegeek9 created an issue. See original summary.

  • bluegeek9 committed 177ce0af on 8.x-4.x
    Issue #3437015: Upgrade bug: 8.x-4.7 to 8.x-4.8
    
alxn’s picture

I can confirm this fixes the error [error] array_key_exists(): Argument #2 ($array) must be of type array, null given when upgrading drupal/ldap 4.7.0 to 4.8.0, thanks!

dasginganinja’s picture

Status: Active » Reviewed & tested by the community

I can confirm that this fixes this issue for us as well as we had issues upgrading to 4.8 with null value for this as well.
Thank you!

bluegeek9’s picture

Assigned: bluegeek9 » Unassigned
Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

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