Skip to content

Commit

Permalink
thinkingreed-inc#261 array_spliceを使った処理に修正
Browse files Browse the repository at this point in the history
(cherry picked from commit 0bd517b)
  • Loading branch information
sota_miyamoto authored and sota_miyamoto committed Sep 6, 2021
1 parent 2611177 commit 4dc6960
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions modules/com_vtiger_workflow/VTWorkflowUtils.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 4dc6960

Please sign in to comment.