mirror of
https://github.com/lrsjng/h5ai.git
synced 2025-08-09 07:16:40 +02:00
Fix some edge case.
This commit is contained in:
@@ -52,7 +52,8 @@ class Util {
|
|||||||
|
|
||||||
public static function ends_with($sequence, $tail) {
|
public static function ends_with($sequence, $tail) {
|
||||||
|
|
||||||
return substr($sequence, -strlen($tail)) === $tail;
|
$len = strlen($tail);
|
||||||
|
return $len === 0 ? true : substr($sequence, -$len) === $tail;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function wrap_pattern($pattern) {
|
public static function wrap_pattern($pattern) {
|
||||||
|
Reference in New Issue
Block a user