From 12f6dca2bb5214ed7fb4c13841b477d2cdd29e67 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Tue, 5 Oct 2021 12:01:16 +0200 Subject: [PATCH] fix PHP 8.0 error: Api\Vfs::lock(): Argument #5 ($scope) cannot be passed by reference --- calendar/inc/class.calendar_uiforms.inc.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/calendar/inc/class.calendar_uiforms.inc.php b/calendar/inc/class.calendar_uiforms.inc.php index f7297a382b..dc75632cea 100644 --- a/calendar/inc/class.calendar_uiforms.inc.php +++ b/calendar/inc/class.calendar_uiforms.inc.php @@ -1739,9 +1739,11 @@ class calendar_uiforms extends calendar_ui $lock_path = Vfs::app_entry_lock_path('calendar',$event['id']); $lock_owner = 'mailto:'.$GLOBALS['egw_info']['user']['account_email']; + $scope = 'shared'; + $type = 'write'; if (($preserv['lock_token'] = $event['lock_token'])) // already locked --> refresh the lock { - Vfs::lock($lock_path,$preserv['lock_token'],$locktime,$lock_owner,$scope='shared',$type='write',true,false); + Vfs::lock($lock_path,$preserv['lock_token'],$locktime,$lock_owner,$scope,$type,true,false); } if (($lock = Vfs::checkLock($lock_path)) && $lock['owner'] != $lock_owner) { @@ -1753,7 +1755,7 @@ class calendar_uiforms extends calendar_ui { $preserv['lock_token'] = $lock['token']; } - elseif(Vfs::lock($lock_path,$preserv['lock_token'],$locktime,$lock_owner,$scope='shared',$type='write',false,false)) + elseif(Vfs::lock($lock_path,$preserv['lock_token'],$locktime,$lock_owner,$scope,$type,false,false)) { //We handle AJAX_REQUEST in client-side for unlocking the locked entry, in case of closing the entry by X button or close button }