Skip to content

Add alias slashes#45

Closed
LKS90 wants to merge 3 commits into
md-systems:8.x-1.xfrom
LKS90:addAliasSlash
Closed

Add alias slashes#45
LKS90 wants to merge 3 commits into
md-systems:8.x-1.xfrom
LKS90:addAliasSlash

Conversation

@LKS90
Copy link
Copy Markdown

@LKS90 LKS90 commented Jul 7, 2015

No description provided.

Comment thread src/AliasCleaner.php
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

I think this edit causes some problems (sometimes deletes not enough).

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

$separator is not always a slash so I think we should keep the trim() here. But, as it would have been trimmed, we should ensure that the leading char is still a slash before returning $output.

Something like this might be enough:

// If the separator is a slash, we need to re-add the leading slash dropped by the trim function.
if ($separator == '/') {
  $output = '/' . $output;
}
return $output;

@Berdir
Copy link
Copy Markdown
Member

Berdir commented Jul 11, 2015

Working a bit on this, can't push to this repository so i'll open a new branch/PR (why can't github fix this...).

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.

3 participants