Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix bad pathing creating double-slashes. #1843

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

Camwyn
Copy link
Member

@Camwyn Camwyn commented Nov 30, 2022

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 self-assigned this Nov 30, 2022
Copy link
Contributor

@lucatume lucatume left a comment

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
3 participants