Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 873a541

Browse filesBrowse files
committed
[Console] do not encode backslashes in console default description
1 parent b2899a6 commit 873a541
Copy full SHA for 873a541

File tree

Expand file treeCollapse file tree

1 file changed

+2
-2
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+2
-2
lines changed

‎src/Symfony/Component/Console/Descriptor/TextDescriptor.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Console/Descriptor/TextDescriptor.php
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -187,10 +187,10 @@ protected function describeApplication(Application $application, array $options
187187
private function formatDefaultValue($default)
188188
{
189189
if (PHP_VERSION_ID < 50400) {
190-
return str_replace('\/', '/', json_encode($default));
190+
return str_replace(array('\/', '\\\\'), array('/', '\\'), json_encode($default));
191191
}
192192

193-
return json_encode($default, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE);
193+
return str_replace('\\\\', '\\', json_encode($default, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE));
194194
}
195195

196196
/**

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.