Error on 404 pages

Created on 26 February 2025, 12 days ago

Problem/Motivation

When setting up the token with `without-some-parameters` or `with-some-parameters` options, we are getting an error on non-existing pages, which should just render a 404 page instead:

TypeError: array_intersect_key(): Argument #1 ($array) must be of type array, null given in array_intersect_key() (line 104 of modules/contrib/token_url_plus/token_url_plus.module).

Steps to reproduce

- Install this module + Metatag (for example)
- Set a global metatag (e.g. canonical URL) that uses the following token: "[current-page:url-with-query:with-some-parameters:page]"
- Go to the path "/path-does-not-exist"

Proposed resolution

- Make sure the $query variable is an array, before performing array-operations on it.

🐛 Bug report
Status

Active

Version

1.0

Component

Code

Created by

🇧🇪Belgium svendecabooter Gent

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024