Skip to content

Commit dc33f5a

Browse files
authored
Merge pull request #14 from aaronlei/patch-1
支持多个文件读取
2 parents 65810c9 + 82bc42c commit dc33f5a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/DfaFilter/SensitiveHelper.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ public function setTreeByFile($filepath = '')
6868
}
6969

7070
// 词库树初始化
71-
$this->wordTree = new HashMap();
71+
$this->wordTree = $this->wordTree ?: new HashMap();
7272

7373
foreach ($this->yieldToReadFile($filepath) as $word) {
7474
$this->buildWordToTree(trim($word));

0 commit comments

Comments
 (0)