Invalid argument supplied for foreach line 327 of NestedArray.php

Created on 2 July 2019, almost 5 years ago
Updated 19 October 2023, 8 months ago

I got this warning twice per user login.

Warning: Invalid argument supplied for foreach() in Drupal\Component\Utility\NestedArray::mergeDeepArray() (line 327 of /var/www/my-he/drupal/core/lib/Drupal/Component/Utility/NestedArray.php)

I found the cause in /var/www/my-he/drupal/modules/contrib/cas_server/src/Controller/UserActionController.php(211): Drupal\Core\Url->toString()

I changed the code to this and it silenced the warnings.

    if (!empty($this->configHelper->serviceParams)) {
      $url = Url::fromUri($service, ['query' => $this->configHelper->serviceParams])->toString();
    }
    else {
      $url = Url::fromUri($service)->toString();
    }
πŸ› Bug report
Status

Closed: cannot reproduce

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States cjokinen

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.69.0 2024