update patch 1
This commit is contained in:
+2
-2
@@ -71,7 +71,7 @@ class FragmentHandler
|
||||
}
|
||||
|
||||
if (!isset($this->renderers[$renderer])) {
|
||||
throw new \InvalidArgumentException(sprintf('The "%s" renderer does not exist.', $renderer));
|
||||
throw new \InvalidArgumentException(\sprintf('The "%s" renderer does not exist.', $renderer));
|
||||
}
|
||||
|
||||
if (!$request = $this->requestStack->getCurrentRequest()) {
|
||||
@@ -95,7 +95,7 @@ class FragmentHandler
|
||||
{
|
||||
if (!$response->isSuccessful()) {
|
||||
$responseStatusCode = $response->getStatusCode();
|
||||
throw new \RuntimeException(sprintf('Error when rendering "%s" (Status code is %d).', $this->requestStack->getCurrentRequest()->getUri(), $responseStatusCode), 0, new HttpException($responseStatusCode));
|
||||
throw new \RuntimeException(\sprintf('Error when rendering "%s" (Status code is %d).', $this->requestStack->getCurrentRequest()->getUri(), $responseStatusCode), 0, new HttpException($responseStatusCode));
|
||||
}
|
||||
|
||||
if (!$response instanceof StreamedResponse) {
|
||||
|
||||
@@ -79,7 +79,7 @@ final class FragmentUriGenerator implements FragmentUriGeneratorInterface
|
||||
if (\is_array($value)) {
|
||||
$this->checkNonScalar($value);
|
||||
} elseif (!\is_scalar($value) && null !== $value) {
|
||||
throw new \LogicException(sprintf('Controller attributes cannot contain non-scalar/non-null values (value for key "%s" is not a scalar or null).', $key));
|
||||
throw new \LogicException(\sprintf('Controller attributes cannot contain non-scalar/non-null values (value for key "%s" is not a scalar or null).', $key));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -74,7 +74,7 @@ class HIncludeFragmentRenderer extends RoutableFragmentRenderer
|
||||
if (\count($attributes) > 0) {
|
||||
$flags = \ENT_QUOTES | \ENT_SUBSTITUTE;
|
||||
foreach ($attributes as $attribute => $value) {
|
||||
$renderedAttributes .= sprintf(
|
||||
$renderedAttributes .= \sprintf(
|
||||
' %s="%s"',
|
||||
htmlspecialchars($attribute, $flags, $this->charset, false),
|
||||
htmlspecialchars($value, $flags, $this->charset, false)
|
||||
@@ -82,7 +82,7 @@ class HIncludeFragmentRenderer extends RoutableFragmentRenderer
|
||||
}
|
||||
}
|
||||
|
||||
return new Response(sprintf('<hx:include src="%s"%s>%s</hx:include>', $uri, $renderedAttributes, $content));
|
||||
return new Response(\sprintf('<hx:include src="%s"%s>%s</hx:include>', $uri, $renderedAttributes, $content));
|
||||
}
|
||||
|
||||
public function getName(): string
|
||||
|
||||
Reference in New Issue
Block a user