PHP warning if library asset provided by route is tagged as external

Created on 29 July 2023, almost 2 years ago

Problem/Motivation

The extlink module defines a library asset for a route that provides a dynamic script. To avoid other modules throwing errors when they assume that a file exists on disk for the asset path, the asset is defined as external. When CSP parses the library definition it assumes that all external assets have a host, resulting in an empty value that causes a downstream warning.

#3223558-20: Hundreds of log entries: Uninitialized string offset: 0

Steps to reproduce

Enable the CSP and Extlink modules.

Proposed resolution

Filter empty host values in LibraryPolicyBuilder::getLibrarySources()

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Fixed

Version

1.0

Component

Code

Created by

🇨🇦Canada gapple

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

Comments & Activities

Production build 0.71.5 2024