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 <thh@inter.net>
This commit is contained in:
parent
32f1a958bf
commit
0d7094582f
@ -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);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user