Problem/Motivation

Warning: Undefined array key "browsers" in Drupal\orejime\Services\JsCollectionRendererOrejime->render() (line 43 of modules/contrib/orejime/src/Services/JsCollectionRendererOrejime.php).

Steps to reproduce

Use the 2.0.0 version of the module with Drupal 10. (don't actually think it is D10 related, but that's how i found it).
Go to any admin page.

Proposed resolution

Personally fixed it with $element['#browsers'] = $js_asset['browsers'] ?? NULL; in \Drupal\orejime\Services\JsCollectionRendererOrejime::render(), but i did not take to the time to check what $element['#browsers'] is expecting, neither as the consequences of the change.

Comments

MBidinger created an issue. See original summary.

  • Fabsgugu committed c526c863 on 2.0.x
    Issue #3326291: Undefined array key "browsers"
    
fabsgugu’s picture

Status: Active » Fixed

Thanks, I've never had this problem.
Instead of NULL I will give an empty array

Status: Fixed » Closed (fixed)

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