Browse Source

Fixed:warning

Jinhui Zhu 6 năm trước cách đây
mục cha
commit
c08ef0f1bd
2 tập tin đã thay đổi với 2 bổ sung2 xóa
  1. 1 1
      src/Library/Download.php
  2. 1 1
      src/Router/Parse/Normal.php

+ 1 - 1
src/Library/Download.php

@@ -126,7 +126,7 @@ class Download
 		header('Content-Transfer-Encoding: binary');
 		header("Accept-Ranges: bytes");
 		header("Accept-Length: ".  filesize($filePath));
-		$fileName = toGBK($fileName);
+		//$fileName = toGBK($fileName);
 		if($view == 'download')
 		{
 			header("Content-Disposition: attachment; filename=". $fileName);

+ 1 - 1
src/Router/Parse/Normal.php

@@ -107,7 +107,7 @@ class Normal
                 $interSet = array_intersect_assoc($configArr, $dir);
                 if($interSet) {
                     $countInterSet = count($interSet);
-                    if($configArr[$countInterSet] == '*' || $configArr[$countInterSet] == $dirInfo[$dirInfo[$key]]) {
+                    if(isset($configArr[$countInterSet]) && ($configArr[$countInterSet] == '*' || (isset($dirInfo[$dirInfo[$key]]) && $configArr[$countInterSet] == $dirInfo[$dirInfo[$key]]))) {
                         if($matchLen < $countInterSet) {
                             $register = ['rule' => $config, 'val' => $val, 'interSet' => $interSet];
                         }else{