Skip to content

Instantly share code, notes, and snippets.

@EclipseGc
Created May 21, 2014 03:33
Show Gist options
  • Save EclipseGc/a4e9453d097665f0885a to your computer and use it in GitHub Desktop.
Save EclipseGc/a4e9453d097665f0885a to your computer and use it in GitHub Desktop.
diff --git a/src/Plugin/PageVariant/HttpStatusCodePageVariant.php b/src/Plugin/PageVariant/HttpStatusCodePageVariant.php
index c7cd807..64946c1 100644
--- a/src/Plugin/PageVariant/HttpStatusCodePageVariant.php
+++ b/src/Plugin/PageVariant/HttpStatusCodePageVariant.php
@@ -47,6 +47,7 @@ class HttpStatusCodePageVariant extends PageVariantBase {
$options = array(
'404' => $options['404'],
'403' => $options['403'],
+ '301' => $options['301'],
'500' => $options['500'],
) + $options;
@@ -90,7 +91,8 @@ class HttpStatusCodePageVariant extends PageVariantBase {
return array();
}
else {
- throw new HttpException($status_code);
+ //throw new HttpException($status_code);
+ return new Response(Response::$statusTexts[$status_code], $status_code);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment