aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIvan Enderlin <ivan.enderlin@hoa-project.net>2013-06-14 15:53:35 +0200
committerIvan Enderlin <ivan.enderlin@hoa-project.net>2013-06-14 15:53:35 +0200
commit45a4507c2dc2d4ff536f0c1129ea665b759a41a0 (patch)
treecf7d6502ffb205162b72ffa881b1bf2c400b7fb3
parent6bf93b53705ff44b7d2b3cd604db74e463b4cc49 (diff)
downloadRouter-45a4507c2dc2d4ff536f0c1129ea665b759a41a0.zip
Router-45a4507c2dc2d4ff536f0c1129ea665b759a41a0.tar.gz
Router-45a4507c2dc2d4ff536f0c1129ea665b759a41a0.tar.bz2
Be compatible with PHP5.3.
-rw-r--r--Http.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/Http.php b/Http.php
index 87316f0..28246fc 100644
--- a/Http.php
+++ b/Http.php
@@ -440,6 +440,7 @@ class Http extends Generic implements \Hoa\Core\Parameter\Parameterizable {
: null;
unset($variables['_fragment']);
+ $self = $this;
$prependPrefix = function ( $unroute ) use ( &$prefix ) {
if(0 !== preg_match('#^https?://#', $unroute))
@@ -447,9 +448,9 @@ class Http extends Generic implements \Hoa\Core\Parameter\Parameterizable {
return $prefix . $unroute;
};
- $getPort = function ( $secure ) {
+ $getPort = function ( $secure ) use ( $self ) {
- $defaultPort = $this->getDefaultPort($secure);
+ $defaultPort = $self->getDefaultPort($secure);
if(false === $secure)
return 80 !== $defaultPort ? ':' . $defaultPort : '';