The function get_magic_quotes_runtime is deprecated in PHP 7.4 as per documantation.
This function has been DEPRECATED as of PHP 7.4.0. Relying on this function is highly discouraged.
How to replace it with a valid code with the same functionality?
A particular example PunBB v1.4.5, file: common.php line 18:
// Turn off magic_quotes_runtime
if (get_magic_quotes_runtime()) {
@ini_set('magic_quotes_runtime', false);
}
Well it is a reference to magic_quotes_runtime which is itself deprecated as of PHP 5.3 and REMOVED in PHP 5.4 so you have no need to use get_magic_quotes_runtime in PHP 7.4
So you can simply update your code accordingly:
/***
* Turn off magic_quotes_runtime
* this function serves no purpose
if (get_magic_quotes_runtime()) {
@ini_set('magic_quotes_runtime', false);
}
***/
Edit: This is just an example, you can simply delete your shown code ;-)
The proper way to replace it is to not use. You can do that by
if(version_compare(PHP_VERSION, '7.4.0', '<') && get_magic_quotes_runtime()) {
@set_magic_quotes_runtime(0);
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With