Skip to content

Commit aed7eab

Browse files
committed
[Console] fixed some initializations in the ProgressBar class
1 parent 554b28d commit aed7eab

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

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

Lines 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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy