redirect_parse_url behavior changed on PHP8

Created on 8 March 2023, about 2 years ago

Problem/Motivation

redirect_parse_url can return incorrect information in PHP8 whereas in PHP7 it was fine.

Steps to reproduce

<?php
// PHP8
redirect_parse_url('something?');
// returns:
// [
// 'path' => 'something',
// 'query' => [],
// 'url' => '',
// ]

// PHP7
redirect_parse_url('something?');
// returns:
// [
// 'path' => 'something',
// 'url' => 'something?',
// ]

Proposed resolution

Fix redirect_parse_url to handle the change in behavior in PHP8 of parse_url whereby an empty 'query' or 'fragment' can be returned.

Remaining tasks

Code up a patch, test it.

User interface changes

None.

API changes

None.

Data model changes

None.

πŸ› Bug report
Status

Active

Version

1.0

Component

Code

Created by

πŸ‡¬πŸ‡§United Kingdom steven jones

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

Comments & Activities

Production build 0.71.5 2024