[TwigBundle] fixed typo
This commit is contained in:
parent
226743f8cf
commit
ff9051d19f
@ -97,7 +97,7 @@ class CodeExtension extends \Twig_Extension
|
|||||||
} elseif ('array' === $item[0]) {
|
} elseif ('array' === $item[0]) {
|
||||||
$formattedValue = sprintf("<em>array</em>(%s)", is_array($item[1]) ? $this->formatArgs($item[1]) : $item[1]);
|
$formattedValue = sprintf("<em>array</em>(%s)", is_array($item[1]) ? $this->formatArgs($item[1]) : $item[1]);
|
||||||
} elseif ('string' === $item[0]) {
|
} elseif ('string' === $item[0]) {
|
||||||
$formattedValue = sprintf("'%s'", htmlspecialchars($item[1], ENT_QUOTES, $this->getCharset()));
|
$formattedValue = sprintf("'%s'", htmlspecialchars($item[1], ENT_QUOTES, $this->charset));
|
||||||
} elseif ('null' === $item[0]) {
|
} elseif ('null' === $item[0]) {
|
||||||
$formattedValue = '<em>null</em>';
|
$formattedValue = '<em>null</em>';
|
||||||
} elseif ('boolean' === $item[0]) {
|
} elseif ('boolean' === $item[0]) {
|
||||||
@ -105,7 +105,7 @@ class CodeExtension extends \Twig_Extension
|
|||||||
} elseif ('resource' === $item[0]) {
|
} elseif ('resource' === $item[0]) {
|
||||||
$formattedValue = '<em>resource</em>';
|
$formattedValue = '<em>resource</em>';
|
||||||
} else {
|
} else {
|
||||||
$formattedValue = str_replace("\n", '', var_export(htmlspecialchars((string) $item[1], ENT_QUOTES, $this->getCharset()), true));
|
$formattedValue = str_replace("\n", '', var_export(htmlspecialchars((string) $item[1], ENT_QUOTES, $this->charset), true));
|
||||||
}
|
}
|
||||||
|
|
||||||
$result[] = is_int($key) ? $formattedValue : sprintf("'%s' => %s", $key, $formattedValue);
|
$result[] = is_int($key) ? $formattedValue : sprintf("'%s' => %s", $key, $formattedValue);
|
||||||
|
Reference in New Issue
Block a user