From d207fab298fd730e67751431337dc6cf0516d127 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8F=B2=E8=BF=AA=E4=BB=94?= Date: Wed, 23 Mar 2022 15:31:49 +0800 Subject: [PATCH] Fixed bug that the file name should be an empty string by default for `Hyperf\Memory\LockManager`. --- CHANGELOG-2.2.md | 4 ++++ src/memory/src/LockManager.php | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG-2.2.md b/CHANGELOG-2.2.md index 4ebab67f9..012434763 100644 --- a/CHANGELOG-2.2.md +++ b/CHANGELOG-2.2.md @@ -1,5 +1,9 @@ # 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 ## Fixed diff --git a/src/memory/src/LockManager.php b/src/memory/src/LockManager.php index b5e36413d..420c83366 100644 --- a/src/memory/src/LockManager.php +++ b/src/memory/src/LockManager.php @@ -25,7 +25,7 @@ class LockManager /** * 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); }