mirror of
https://github.com/zhamao-robot/zhamao-framework.git
synced 2026-07-02 14:25:38 +08:00
fix bug #136
This commit is contained in:
@@ -72,7 +72,10 @@
|
|||||||
],
|
],
|
||||||
"config": {
|
"config": {
|
||||||
"optimize-autoloader": true,
|
"optimize-autoloader": true,
|
||||||
"sort-packages": true
|
"sort-packages": true,
|
||||||
|
"allow-plugins": {
|
||||||
|
"phpstan/extension-installer": true
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"extra": {
|
"extra": {
|
||||||
"hooks": {
|
"hooks": {
|
||||||
|
|||||||
@@ -156,16 +156,16 @@ function match_args(string $pattern, string $subject)
|
|||||||
$exp = explode('*', $pattern);
|
$exp = explode('*', $pattern);
|
||||||
$i = 0;
|
$i = 0;
|
||||||
foreach ($exp as $k => $v) {
|
foreach ($exp as $k => $v) {
|
||||||
if (empty($v) && $k === 0) {
|
if ($v === '' && $k === 0) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (empty($v) && $k === count($exp) - 1) {
|
if ($v === '' && $k === count($exp) - 1) {
|
||||||
$subject .= '^EOL';
|
$subject .= '^EOL';
|
||||||
$v = '^EOL';
|
$v = '^EOL';
|
||||||
}
|
}
|
||||||
$cur_var = '';
|
$cur_var = '';
|
||||||
$ori = $i;
|
$ori = $i;
|
||||||
while (($a = mb_substr($subject, $i, mb_strlen($v))) !== $v && !empty($a)) {
|
while (($a = mb_substr($subject, $i, mb_strlen($v))) !== $v && $a !== '') {
|
||||||
$cur_var .= mb_substr($subject, $i, 1);
|
$cur_var .= mb_substr($subject, $i, 1);
|
||||||
++$i;
|
++$i;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user