Skip to content

Fix bad pathing creating double-slashes. - #1843

Open
Camwyn wants to merge 4 commits into
masterfrom
fix/ECP-1400-bad-ct1-paths
Open

Fix bad pathing creating double-slashes.#1843
Camwyn wants to merge 4 commits into
masterfrom
fix/ECP-1400-bad-ct1-paths

Conversation

@Camwyn

@Camwyn Camwyn commented Nov 30, 2022

Copy link
Copy Markdown
Contributor

To do so we run array_filter() (without a second param - so it just removes empty items) on $path before we run implode().

When we implode the $path arrays, ensure we first remove all empty items or we wind up with things like /site/tec/dev/themes/twentytwenty//tribe/events-pro//custom-tables-v1 instead of
/site/tec/dev/themes/twentytwenty/tribe/events-pro/custom-tables-v1

🎥 https://d.pr/v/ihcOLc

Part of ECP-1400

Related: https://github.com/the-events-calendar/events-pro/pull/2139

run `array_filter()` (without a second param - so it jsut removes empty items) on $path before we run `implode()`
Part of [ECP-1400]

When we implode the $path arrays, ensure we first remove all empty items or we wind up with things like
`/site/tec/dev/themes/twentytwenty//tribe/events-pro//custom-tables-v1`
instead of
`/site/tec/dev/themes/twentytwenty/tribe/events-pro/custom-tables-v1`

:movie_camera: https://d.pr/v/ihcOLc
@Camwyn Camwyn added the code review Status: requires a code review. label Nov 30, 2022
@Camwyn Camwyn added this to the Release B22.zeppole milestone Nov 30, 2022
@Camwyn
Camwyn requested review from bordoni and lucatume November 30, 2022 21:38
@Camwyn Camwyn self-assigned this Nov 30, 2022

@lucatume lucatume left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add some test coverage.

@Camwyn
Camwyn changed the base branch from release/B22.zeppole to master January 26, 2023 20:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

code review Status: requires a code review.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants