Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 2.4.1

Bug #23839 get_magic_quotes_runtime() is deprecated
Submitted: 2019-08-04 09:36 UTC
From: hanno Assigned: avb
Status: Closed Package: HTTP_Request2 (version 2.3.0)
PHP Version: Irrelevant OS:
Roadmaps: (Not assigned)    

 [2019-08-04 09:36 UTC] hanno (Hanno Boeck)
Description: ------------ In PHP 7.4 calling get_magic_quotes_runtime() will trigger a warning/notice, in future versions it'll be removed. Messages like this will appear in the error log: Notice: Function get_magic_quotes_runtime() is deprecated in [path]/HTTP/Request2.php:935 This is the code in question: // 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); } magic quotes have been deprecated for a long time, according to the docs [1] since PHP 5.4 this function always returns false. Thus for all currently supported versions and several versions back this code is basically a noop. I recommend removing it. I'm attaching a patch, if you prefer I can also create a pull request on your github repo. [1]


 [2019-08-04 09:37 UTC] hanno (Hanno Boeck)
 [2020-07-05 19:20 UTC] avb (Alexey Borzov)
-Status: Open +Status: Closed -Assigned To: +Assigned To: avb
Dropped magic_quotes_runtime handling in git: