Fixed bug that the file name should be an empty string by default for Hyperf\Memory\LockManager.

This commit is contained in:
史迪仔 2022-03-23 15:31:49 +08:00 committed by GitHub
parent 1f7ba04f18
commit d207fab298
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 1 deletions

View File

@ -1,5 +1,9 @@
# v2.2.29 - TBD # v2.2.29 - TBD
## Fixed
- [#4620](https://github.com/hyperf/hyperf/pull/4620) Fixed bug that the file name should be an empty string by default for `Hyperf\Memory\LockManager`.
# v2.2.28 - 2022-03-14 # v2.2.28 - 2022-03-14
## Fixed ## Fixed

View File

@ -25,7 +25,7 @@ class LockManager
/** /**
* You should initialize a Lock with the identifier before use it. * You should initialize a Lock with the identifier before use it.
*/ */
public static function initialize(string $identifier, int $type = SWOOLE_RWLOCK, string $filename = null): void public static function initialize(string $identifier, int $type = SWOOLE_RWLOCK, string $filename = ''): void
{ {
static::$container[$identifier] = new Lock($type, $filename); static::$container[$identifier] = new Lock($type, $filename);
} }