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 aed7eab

Browse filesBrowse files
committed
[Console] fixed some initializations in the ProgressBar class
1 parent 554b28d commit aed7eab
Copy full SHA for aed7eab

File tree

Expand file treeCollapse file tree

1 file changed

+8
-0
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+8
-0
lines changed
Open diff view settings
Collapse file

‎src/Symfony/Component/Console/Helper/ProgressBar.php‎

Copy file name to clipboardExpand all lines: src/Symfony/Component/Console/Helper/ProgressBar.php
+8Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,10 @@ public static function setPlaceholderFormatterDefinition($name, $callable)
9797
*/
9898
public static function getPlaceholderFormatterDefinition($name)
9999
{
100+
if (!self::$formatters) {
101+
self::$formatters = self::initPlaceholderFormatters();
102+
}
103+
100104
return isset(self::$formatters[$name]) ? self::$formatters[$name] : null;
101105
}
102106

@@ -126,6 +130,10 @@ public static function setFormatDefinition($name, $format)
126130
*/
127131
public static function getFormatDefinition($name)
128132
{
133+
if (!self::$formats) {
134+
self::$formats = self::initFormats();
135+
}
136+
129137
return isset(self::$formats[$name]) ? self::$formats[$name] : null;
130138
}
131139

0 commit comments

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