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: buildWithBaseURLPath corrupts the current route if it contains slashes, causing assertion validation to fail #249 #555

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

Conversation

malekbig
Copy link

Fix buildWithBaseURLPath corrupts the current route if it contains slashes, causing assertion validation to fail

Fix buildWithBaseURLPath corrupts the current route if it contains slashes, causing assertion validation to fail
@pitbulk
Copy link
Contributor

pitbulk commented Jun 6, 2023

@malekbig It seems your fix breaks a test

if (!empty($baseURLPath) && !empty($info)) {
$path = explode('/', $info);
if (count($path) > 1) {
$info = implode(array_filter($path), '/');
Copy link

Choose a reason for hiding this comment

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

implode arguments are backwards. https://www.php.net/implode

@joelpittet
Copy link

Also the subdirectory now gets duplicated if you fix the argument issue with implode. https://3v4l.org/1qpDY

I'm trying to solve a similar issue with this function. The array_pop() assumes only one component path

@joelpittet
Copy link

This might fix it #581 and sounds like a dupe of #579

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants