From 0d7094582fc40aa28c7e133d31dd4dc74665612a Mon Sep 17 00:00:00 2001 From: Thomas Hochstein Date: Sat, 10 Aug 2019 11:42:57 +0200 Subject: [PATCH] Patch HTTP_Request2 to fix PHP 7.4 issue. Applying the patch from https://pear.php.net/bugs/bug.php?id=23839&edit=12&patch=remove-obsolete-magic-quotes-function&revision=1564911457 Fixes #615 Signed-off-by: Thomas Hochstein --- bundled-libs/HTTP/Request2.php | 8 -------- 1 file changed, 8 deletions(-) diff --git a/bundled-libs/HTTP/Request2.php b/bundled-libs/HTTP/Request2.php index b835822e..dc49725e 100644 --- a/bundled-libs/HTTP/Request2.php +++ b/bundled-libs/HTTP/Request2.php @@ -930,11 +930,6 @@ class HTTP_Request2 implements SplSubject if (empty($this->adapter)) { $this->setAdapter($this->getConfig('adapter')); } - // magic_quotes_runtime may break file uploads and chunked response - // processing; see bug #4543. Don't use ini_get() here; see bug #16440. - if ($magicQuotes = get_magic_quotes_runtime()) { - set_magic_quotes_runtime(false); - } // force using single byte encoding if mbstring extension overloads // strlen() and substr(); see bug #1781, bug #10605 if (extension_loaded('mbstring') && (2 & ini_get('mbstring.func_overload'))) { @@ -947,9 +942,6 @@ class HTTP_Request2 implements SplSubject } catch (Exception $e) { } // cleanup in either case (poor man's "finally" clause) - if ($magicQuotes) { - set_magic_quotes_runtime(true); - } if (!empty($oldEncoding)) { mb_internal_encoding($oldEncoding); }