aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIvan Enderlin <ivan.enderlin@hoa-project.net>2014-01-25 13:07:49 +0100
committerIvan Enderlin <ivan.enderlin@hoa-project.net>2014-01-25 13:07:49 +0100
commit3a4c08f2f694be4d4e62eec667cff9996082dd6b (patch)
treee46575d80782b1e76a6f7bf180ace37a54873016
parentaf9b54379fd67c00bb419018e7eeb1482dba008e (diff)
downloadRouter-3a4c08f2f694be4d4e62eec667cff9996082dd6b.zip
Router-3a4c08f2f694be4d4e62eec667cff9996082dd6b.tar.gz
Router-3a4c08f2f694be4d4e62eec667cff9996082dd6b.tar.bz2
Allow a null subdomain when unrouting.
But we still throw an exception for an empty subdomain.
-rw-r--r--Http.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/Http.php b/Http.php
index f650fa2..210b7b2 100644
--- a/Http.php
+++ b/Http.php
@@ -489,7 +489,8 @@ class Http extends Generic implements \Hoa\Core\Parameter\Parameterizable {
return 443 !== $defaultPort ? ':' . $defaultPort : '';
};
- if(true === array_key_exists('_subdomain', $variables)) {
+ if( true === array_key_exists('_subdomain', $variables)
+ && null !== $variables['_subdomain']) {
if(empty($variables['_subdomain']))
throw new Exception(