You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[Routing] fixed route generation with a hostname pattern when the hostname is the same as the current one (no need to force the generated URL to be absolute)
if (in_array($tparams[$token[3]], array(null, '', false), true)) {
193
-
// check requirement
194
-
if ($tparams[$token[3]] && !preg_match('#^'.$token[2].'$#', $tparams[$token[3]])) {
195
-
thrownewInvalidParameterException(sprintf('Parameter "%s" for route "%s" must match "%s" ("%s" given).', $token[3], $name, $token[2], $tparams[$token[3]]));
196
-
}
197
-
}
198
-
199
-
$host = $token[1].$tparams[$token[3]].$host;
200
-
201
-
} elseif ('text' === $token[0]) {
202
-
$host = $token[1].$host;
203
-
}
204
-
}
205
-
}
206
-
207
188
// add a query string if needed
208
189
$extra = array_diff_key($parameters, $variables);
209
190
if ($extra && $query = http_build_query($extra, '', '&')) {
if (in_array($mergedParams[$token[3]], array(null, '', false), true)) {
206
+
// check requirement
207
+
if ($mergedParams[$token[3]] && !preg_match('#^'.$token[2].'$#', $mergedParams[$token[3]])) {
208
+
thrownewInvalidParameterException(sprintf('Parameter "%s" for route "%s" must match "%s" ("%s" given).', $token[3], $name, $token[2], $mergedParams[$token[3]]));
0 commit comments