Problem/Motivation

When I am running drush image:flush --all. We are receiving below errors;

[warning] Undefined array key 2 LibraryStream.php:36
[warning] The following theme is missing from the file system: styles ExtensionPathResolver.php:63
[warning] The following theme is missing from the file system: styles ExtensionPathResolver.php:63
[warning] Array to string conversion LocalStream.php:122

I found web/modules/contrib/patternkit/src/StreamWrapper/LibraryStream.php file is causing this warning message. This below line of code is expecting the $uri should contain minimum two "/" however it received one "/" for which it's triggering these warning messages.

[$extension, $library, $type_level] = explode('/', $uri);

Steps to reproduce

Run drush image:flush --all in your Drupal setup

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Issue fork patternkit-3407141

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:

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

pravat231 created an issue. See original summary.

pravat231’s picture

FileSize
1.14 KB
minsharm’s picture

FileSize
129.89 KB

I tried to reproduce the issue and getting the same warning message

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

slucero’s picture

Status: Active » Needs review
Parent issue: » #3412153: Patternkit Beta 9 Release Plan

I've reviewed the code change here and it looks good to me. I was able to reproduce the issue locally, and applying the patch seems to resolve it without any adverse issues I ran into. I've applied the patch onto an MR for testing before getting this merged in.

Thanks for the work @pravat231!

minsharm’s picture

FileSize
42.45 KB

Retested the issue and result looks good to me.

Result : Not getting the warning message anymore.

  • slucero committed 9c9ecd63 on 9.1.x
    Issue #3407141 by pravat231, minsharm: Undefined array key 2...
slucero’s picture

Status: Needs review » Fixed

Merged for inclusion in the Beta 9 release. Thanks for the contribution!

Status: Fixed » Closed (fixed)

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