From: William Desportes <williamdes@wdes.fr>
Date: Sat, 18 Mar 2023 16:09:20 +0100
Subject: Do not call get_magic_quote_gpc() when running in PHP version >=
 5.4.

This deprecated function has been removed in PHP 8.

Origin: upstream
Forwarded: https://github.com/leenooks/phpLDAPadmin/commit/3ec9c23d585826aa29f5f25ac43ca077f5fe5377
---
 lib/common.php | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/lib/common.php b/lib/common.php
index 1ab1672..126aadc 100644
--- a/lib/common.php
+++ b/lib/common.php
@@ -296,7 +296,9 @@ if ($app['language'] == 'auto') {
  * Strip slashes from GET, POST, and COOKIE variables if this
  * PHP install is configured to automatically addslashes()
  */
-if (@get_magic_quotes_gpc() && (! isset($slashes_stripped) || ! $slashes_stripped)) {
+if (@version_compare(phpversion(), '5.4.0', '<') &&
+    @get_magic_quotes_gpc() &&
+    (!isset($slashes_stripped) || !$slashes_stripped)) {
 	array_stripslashes($_REQUEST);
 	array_stripslashes($_GET);
 	array_stripslashes($_POST);
