From 7f6de9bae1fbbbb452040ee26d364ff0b23645f2 Mon Sep 17 00:00:00 2001 From: Urban Müller Date: Mon, 27 Jul 2020 17:26:11 +0200 Subject: make arg optional --- it_url.class | 4 ++-- 1 file 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) { -- cgit v1.2.3