diff options
-rw-r--r-- | it_url.class | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/it_url.class b/it_url.class index f9cafc7..f48c7f9 100644 --- a/it_url.class +++ b/it_url.class @@ -681,7 +681,7 @@ static function _expired($path, $maxage) * @param $path File to lock * @return Lock handle if successfully locked file */ -static function _lock($path, $p) +static function _lock($path, $p = []) { $force = EDC('nocache') || (($mtime = @filemtime("$path.lock")) && (time() - $mtime > 30)); # expire forgotten locks return ($p['lock'] ?? true) ? @it::fopen("$path.lock", $force ? "w" : "x") : true; @@ -692,7 +692,7 @@ static function _lock($path, $p) * @param $path File to unlock * @param $lock Handle to lock acquird by _lock */ -static function _unlock($path, $lock, $p) +static function _unlock($path, $lock, $p = []) { if ($p['lock'] ?? true) { |