Browse Source

ComposerUpdate

Anyon 4 years ago
parent
commit
f5d1e8a389

+ 4 - 4
vendor/composer/installed.json

@@ -937,12 +937,12 @@
         "source": {
             "type": "git",
             "url": "https://github.com/zoujingli/ThinkLibrary.git",
-            "reference": "5dca339c3a9440425b5e2586c60b63ea58043835"
+            "reference": "db5d81e44af053a3a3f19c1593c2d5e52d58084c"
         },
         "dist": {
             "type": "zip",
-            "url": "https://api.github.com/repos/zoujingli/ThinkLibrary/zipball/5dca339c3a9440425b5e2586c60b63ea58043835",
-            "reference": "5dca339c3a9440425b5e2586c60b63ea58043835",
+            "url": "https://api.github.com/repos/zoujingli/ThinkLibrary/zipball/db5d81e44af053a3a3f19c1593c2d5e52d58084c",
+            "reference": "db5d81e44af053a3a3f19c1593c2d5e52d58084c",
             "shasum": "",
             "mirrors": [
                 {
@@ -959,7 +959,7 @@
             "ext-mbstring": "*",
             "topthink/framework": "^6.0"
         },
-        "time": "2020-11-07T15:02:39+00:00",
+        "time": "2020-11-10T03:25:39+00:00",
         "type": "library",
         "extra": {
             "think": {

+ 5 - 6
vendor/zoujingli/think-library/src/common.php

@@ -153,8 +153,8 @@ if (!function_exists('str2arr')) {
     {
         $text = trim($text, $separ);
         $data = strlen($text) ? explode($separ, $text) : [];
-        if (is_array($allow)) foreach ($data as $key => $mark) {
-            if (!in_array($mark, $allow)) unset($data[$key]);
+        if (is_array($allow)) foreach ($data as $key => $item) {
+            if (!in_array($item, $allow)) unset($data[$key]);
         }
         return $data;
     }
@@ -169,11 +169,10 @@ if (!function_exists('arr2str')) {
      */
     function arr2str(array $data, string $separ = ',', ?array $allow = null)
     {
-        $temp = [];
-        if (is_array($allow)) foreach ($data as $item) {
-            if (in_array($item, $allow)) $temp[] = $item;
+        if (is_array($allow)) foreach ($data as $key => $item) {
+            if (!in_array($item, $allow)) unset($data[$key]);
         }
-        return $separ . join($separ, $temp) . $separ;
+        return $separ . join($separ, $data) . $separ;
     }
 }
 if (!function_exists('encode')) {

+ 2 - 2
vendor/zoujingli/think-library/src/multiple/BuildUrl.php

@@ -154,8 +154,8 @@ class BuildUrl extends Url
         }
         /*=====- 插件 Addons URL 处理 - 开始 -=====*/
         if (preg_match("#^{$depr}addons-{$app}({$depr}|\.|$)#i", $uri)) {
-            [$prefix, $suffix] = explode($depr, $url . $depr, 2);
-            if ($prefix === $app) $url = rtrim("addons-{$app}{$depr}{$suffix}", $depr);
+            [$pre, $suf] = explode($depr, $url . $depr, 2);
+            if ($pre === $app) $url = rtrim("addons-{$app}{$depr}{$suf}", $depr);
         }
         /*=====- 插件 Addons URL 处理 - 结束 -=====*/
         $url = rtrim($file, '/') . '/' . ltrim($url, '/');