Mercurial > hg > isophonics-drupal-site
comparison vendor/symfony/console/Formatter/OutputFormatter.php @ 14:1fec387a4317
Update Drupal core to 8.5.2 via Composer
author | Chris Cannam |
---|---|
date | Mon, 23 Apr 2018 09:46:53 +0100 |
parents | 4c8ae668cc8c |
children | 129ea1e6d783 |
comparison
equal
deleted
inserted
replaced
13:5fb285c0d0e3 | 14:1fec387a4317 |
---|---|
50 public static function escapeTrailingBackslash($text) | 50 public static function escapeTrailingBackslash($text) |
51 { | 51 { |
52 if ('\\' === substr($text, -1)) { | 52 if ('\\' === substr($text, -1)) { |
53 $len = strlen($text); | 53 $len = strlen($text); |
54 $text = rtrim($text, '\\'); | 54 $text = rtrim($text, '\\'); |
55 $text .= str_repeat('<<', $len - strlen($text)); | 55 $text = str_replace("\0", '', $text); |
56 $text .= str_repeat("\0", $len - strlen($text)); | |
56 } | 57 } |
57 | 58 |
58 return $text; | 59 return $text; |
59 } | 60 } |
60 | 61 |
165 } | 166 } |
166 } | 167 } |
167 | 168 |
168 $output .= $this->applyCurrentStyle(substr($message, $offset)); | 169 $output .= $this->applyCurrentStyle(substr($message, $offset)); |
169 | 170 |
170 if (false !== strpos($output, '<<')) { | 171 if (false !== strpos($output, "\0")) { |
171 return strtr($output, array('\\<' => '<', '<<' => '\\')); | 172 return strtr($output, array("\0" => '\\', '\\<' => '<')); |
172 } | 173 } |
173 | 174 |
174 return str_replace('\\<', '<', $output); | 175 return str_replace('\\<', '<', $output); |
175 } | 176 } |
176 | 177 |
212 $options = array_shift($options); | 213 $options = array_shift($options); |
213 foreach ($options as $option) { | 214 foreach ($options as $option) { |
214 try { | 215 try { |
215 $style->setOption($option); | 216 $style->setOption($option); |
216 } catch (\InvalidArgumentException $e) { | 217 } catch (\InvalidArgumentException $e) { |
217 @trigger_error(sprintf('Unknown style options are deprecated since version 3.2 and will be removed in 4.0. Exception "%s".', $e->getMessage()), E_USER_DEPRECATED); | 218 @trigger_error(sprintf('Unknown style options are deprecated since Symfony 3.2 and will be removed in 4.0. Exception "%s".', $e->getMessage()), E_USER_DEPRECATED); |
218 | 219 |
219 return false; | 220 return false; |
220 } | 221 } |
221 } | 222 } |
222 } else { | 223 } else { |