Skip to content

Commit f7ea68f

Browse files
committed
[Routing] Fixed undefined variable + typo
1 parent 4ad1e14 commit f7ea68f

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/Symfony/Component/Routing/Matcher/Dumper/ApacheMatcherDumper.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,16 +47,16 @@ public function dump(array $options = array())
4747
$rules = array("# skip \"real\" requests\nRewriteCond %{REQUEST_FILENAME} -f\nRewriteRule .* - [QSA,L]");
4848
$methodVars = array();
4949
$hostnameRegexUnique = 0;
50-
$prevHosnameRegex = '';
50+
$prevHostnameRegex = '';
5151

5252
foreach ($this->getRoutes()->all() as $name => $route) {
5353

5454
$compiledRoute = $route->compile();
5555
$hostnameRegex = $compiledRoute->getHostnameRegex();
5656

57-
if (null !== $hostnameRegex && $prevHosnameRegex !== $hostnameRegex) {
57+
if (null !== $hostnameRegex && $prevHostnameRegex !== $hostnameRegex) {
5858

59-
$prevHosnameRegex = $hostnameRegex;
59+
$prevHostnameRegex = $hostnameRegex;
6060
$hostnameRegexUnique++;
6161

6262
$rule = array();
@@ -217,7 +217,7 @@ private function regexToApacheRegex($regex)
217217
$delimiter = $regex[0];
218218
$regexPatternEnd = strrpos($regex, $delimiter);
219219
if (strlen($regex) < 2 || 0 === $regexPatternEnd) {
220-
throw new \LogicException('The "%s" route regex "%s" is invalid', $name, $regex);
220+
throw new \LogicException('The route regex "%s" is invalid', $regex);
221221
}
222222
$regex = preg_replace('/\?<.+?>/', '', substr($regex, 1, $regexPatternEnd - 1));
223223

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy