mirror of
https://github.com/zhamao-robot/zhamao-framework.git
synced 2026-03-18 05:04:51 +08:00
fix bug #136
This commit is contained in:
parent
5459d1c5ff
commit
b1e37943df
@ -72,7 +72,10 @@
|
||||
],
|
||||
"config": {
|
||||
"optimize-autoloader": true,
|
||||
"sort-packages": true
|
||||
"sort-packages": true,
|
||||
"allow-plugins": {
|
||||
"phpstan/extension-installer": true
|
||||
}
|
||||
},
|
||||
"extra": {
|
||||
"hooks": {
|
||||
|
||||
@ -156,16 +156,16 @@ function match_args(string $pattern, string $subject)
|
||||
$exp = explode('*', $pattern);
|
||||
$i = 0;
|
||||
foreach ($exp as $k => $v) {
|
||||
if (empty($v) && $k === 0) {
|
||||
if ($v === '' && $k === 0) {
|
||||
continue;
|
||||
}
|
||||
if (empty($v) && $k === count($exp) - 1) {
|
||||
if ($v === '' && $k === count($exp) - 1) {
|
||||
$subject .= '^EOL';
|
||||
$v = '^EOL';
|
||||
}
|
||||
$cur_var = '';
|
||||
$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);
|
||||
++$i;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user