-
Notifications
You must be signed in to change notification settings - Fork 40
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
Undefined array key "-" in path_clean_string() #6834
Comments
I have reproduced this issue, and submitted a PR. @NormPlum, can you check? HOWEVER, I'm a bit hesitant about this approach. The warning happened because Backdrop tries to apply the same operation to "fancy characters" that resemble the hyphen (en and em dashes). When you select "do nothing" for hyphens, then Backdrop doesn't know what to do with en and em dashes. Fortunately, the call to So, this needs to be tested thoroughly with different scenarios. |
@argiepiano The PR fixes the problem (the warning's not displayed). I'm also not sure what the best solution is but I wonder if |
I think you are right - isset is better, since one of the options is to remove the character, in which case the value for that array element would be an empty string, and we don't want to skip the assignment of the fancy character in that case. |
I've pushed that change. Please test... |
Yep, that works too - no warning displayed. |
Description of the bug
The following warning message is shown in the logs when you save a node and hyphens are set to not be replaced in the URL alias patterns settings:
Steps To Reproduce
To reproduce the behavior:
/admin/config/urls/path/patterns/settings
)Actual behavior
Warning displayed.
Expected behavior
No warning displayed.
Additional information
Add any other information that could help, such as:
The text was updated successfully, but these errors were encountered: