mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-09 16:12:49 +08:00
修正Route类一处bug
This commit is contained in:
@@ -600,6 +600,7 @@ class Route
|
|||||||
foreach ($m2 as $key => $val) {
|
foreach ($m2 as $key => $val) {
|
||||||
// val中定义了多个变量 <id><name>
|
// val中定义了多个变量 <id><name>
|
||||||
if (false !== strpos($val, '<') && preg_match_all('/<(\w+(\??))>/', $val, $matches)) {
|
if (false !== strpos($val, '<') && preg_match_all('/<(\w+(\??))>/', $val, $matches)) {
|
||||||
|
$value = [];
|
||||||
foreach ($matches[1] as $name) {
|
foreach ($matches[1] as $name) {
|
||||||
if (strpos($name, '?')) {
|
if (strpos($name, '?')) {
|
||||||
$name = substr($name, 0, -1);
|
$name = substr($name, 0, -1);
|
||||||
|
|||||||
Reference in New Issue
Block a user