Skip to content

Commit 2643b1c

Browse files
committed
Fix bug.
1 parent 0d3bbd9 commit 2643b1c

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

demo/swoole_server.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?php
2+
/**
3+
*
4+
* Author: abel
5+
* Email:abel.zhou@hotmail.com
6+
* Date: 2018/7/31
7+
* Time: 16:23
8+
*/

src/TrieTree.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -263,10 +263,10 @@ public function getTreeWord($word, $deep = 0) {
263263
}
264264
$tree = &$tree[$val]["child"];
265265
} else {
266-
//第一个字符都没有命中
267-
if ($key == 0) {
266+
//遇到没有命中的返回
267+
// if ($key == 0) {
268268
return [];
269-
}
269+
// }
270270
}
271271
}
272272
$this->_getTreeWord($tree, $deep, $words);

0 commit comments

Comments
 (0)