From 4dc6960d2587d522b871e703ddc2d319b9fe6fc5 Mon Sep 17 00:00:00 2001 From: sota_miyamoto Date: Mon, 23 Aug 2021 17:43:49 +0900 Subject: [PATCH] =?UTF-8?q?#261=20array=5Fsplice=E3=82=92=E4=BD=BF?= =?UTF-8?q?=E3=81=A3=E3=81=9F=E5=87=A6=E7=90=86=E3=81=AB=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit (cherry picked from commit 0bd517b53bf7508deebcd349b4b01bbe6b6aac66) --- modules/com_vtiger_workflow/VTWorkflowUtils.php | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/modules/com_vtiger_workflow/VTWorkflowUtils.php b/modules/com_vtiger_workflow/VTWorkflowUtils.php index 8da81f93a..2057543d4 100644 --- a/modules/com_vtiger_workflow/VTWorkflowUtils.php +++ b/modules/com_vtiger_workflow/VTWorkflowUtils.php @@ -65,11 +65,8 @@ function loggedInUser() { */ function revertUser() { global $current_user; - $userStackCounts = count(self::$userStack); - if ($userStackCounts != 0) { - for ($i=1; $i<$userStackCounts; $i++) { - array_pop(self::$userStack); - } + if (count(self::$userStack) != 0) { + array_splice(self::$userStack, 1); $current_user = self::$userStack[0]; } else { $current_user = null;