Created
May 21, 2014 03:33
-
-
Save EclipseGc/a4e9453d097665f0885a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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