From e3dd84caef928f10acfd5d40a3c07c4354dd896d Mon Sep 17 00:00:00 2001
From: Zauberfisch <admin@zauberfisch.at>
Date: Thu, 16 Jul 2020 13:51:24 +0200
Subject: [PATCH] Fixed php7.4 deprecation notice for magic quotes

---
 core/Constants.php | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/core/Constants.php b/core/Constants.php
index e0537eda5..48f10103b 100644
--- a/core/Constants.php
+++ b/core/Constants.php
@@ -167,9 +167,10 @@ if(!isset($_SERVER['HTTP_HOST'])) {
 	 */
 } else {
 	/**
-	 * Fix magic quotes setting
+	 * Check if magic quotes are enabled (only relevant for php 5.3)
+	 * get_magic_quotes_gpc() call is suppressed to avoid php7.4 deprecation notice
 	 */
-	if (function_exists('get_magic_quotes_gpc') && get_magic_quotes_gpc()) {
+	if (function_exists('get_magic_quotes_gpc') && @get_magic_quotes_gpc()) {
 		if($_REQUEST) stripslashes_recursively($_REQUEST);
 		if($_GET) stripslashes_recursively($_GET);
 		if($_POST) stripslashes_recursively($_POST);