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
thrownew \DomainException(sprintf('Variable name "%s" cannot be numeric in route pattern "%s". Please use a different name.', $varName, $pattern));
108
+
// A PCRE subpattern name must start with a non-digit. Also a PHP variable cannot start with a digit so the
109
+
// variable would not be usable as a Controller action argument.
110
+
if (preg_match('/^\d/', $varName)) {
111
+
thrownew \DomainException(sprintf('Variable name "%s" cannot start with a digit in route pattern "%s". Please use a different name.', $varName, $pattern));
100
112
}
101
113
if (in_array($varName, $variables)) {
102
114
thrownew \LogicException(sprintf('Route pattern "%s" cannot reference variable name "%s" more than once.', $pattern, $varName));
103
115
}
104
116
117
+
if (strlen($varName) > self::VARIABLE_MAXIMUM_LENGTH) {
118
+
thrownew \DomainException(sprintf('Variable name "%s" cannot be longer than %s characters in route pattern "%s". Please use a shorter name.', $varName, self::VARIABLE_MAXIMUM_LENGTH, $pattern));
0 commit comments