From a23052c6cd5a63ddb87cee2d42f5117d69fd50ba Mon Sep 17 00:00:00 2001
From: Marius Burkard <m.burkard@pixcept.de>
Date: Wed, 31 Jul 2019 15:14:20 +0200
Subject: [PATCH] - fixed argument replacement in exec_safe function

---
 interface/lib/classes/system.inc.php | 3 ++-
 server/lib/classes/system.inc.php    | 1 +
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/interface/lib/classes/system.inc.php b/interface/lib/classes/system.inc.php
index ede53034d3..0be2b6b1e9 100644
--- a/interface/lib/classes/system.inc.php
+++ b/interface/lib/classes/system.inc.php
@@ -71,7 +71,8 @@ class system {
 		}
 		if($arg_count > 1) {
 			$args = func_get_args();
-
+			array_shift($args);
+			
 			$pos = 0;
 			$a = 0;
 			foreach($args as $value) {
diff --git a/server/lib/classes/system.inc.php b/server/lib/classes/system.inc.php
index 88cf83eeba..288f9d73f8 100644
--- a/server/lib/classes/system.inc.php
+++ b/server/lib/classes/system.inc.php
@@ -2077,6 +2077,7 @@ class system{
 		}
 		if($arg_count > 1) {
 			$args = func_get_args();
+			array_shift($args);
 
 			$pos = 0;
 			$a = 0;
-- 
GitLab