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

[stable21] Fix missing setlocale with php 8 #29742

Merged
merged 6 commits into from
Nov 17, 2021
Merged

Conversation

backportbot-nextcloud[bot]
Copy link

backport of #29695

When php version = 8, basename('§') does not bug even if LC_ALL is non-UTF-8 locale.
This cause OC_Util::isSetLocaleWorking() to skip setlocale("C.UTF-8").

Fix it by using escapeshellcmd instead of basename.

Signed-off-by: Naoto Kobayashi <naoto.kobayashi4c@gmail.com>
Signed-off-by: Naoto Kobayashi <naoto.kobayashi4c@gmail.com>
Signed-off-by: Naoto Kobayashi <naoto.kobayashi4c@gmail.com>
Using escapeshellcmd to get current locale causes error
if the function is disabled.

Add fallbacks to prevent the error.

Signed-off-by: Naoto Kobayashi <naoto.kobayashi4c@gmail.com>
Signed-off-by: Naoto Kobayashi <naoto.kobayashi4c@gmail.com>
Signed-off-by: Naoto Kobayashi <naoto.kobayashi4c@gmail.com>
Copy link
Member

@PVince81 PVince81 left a comment

Choose a reason for hiding this comment

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

👍

@PVince81
Copy link
Member

test failure unrelated and I see php 7.4 was already covered and passing in other test suites

@PVince81 PVince81 merged commit 18c190f into stable21 Nov 17, 2021
@PVince81 PVince81 deleted the backport/29695/stable21 branch November 17, 2021 12:12
This was referenced Jan 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants