pnp4nagios icon indicating copy to clipboard operation
pnp4nagios copied to clipboard

Function get_magic_quotes_runtime() is deprecated

Open onkobu opened this issue 4 years ago • 1 comments

File: /usr/lib64/kohana/system/libraries/Input.php [57], see also PHP Release Notes. Seems to be safe to simply uncomment this if and the next one. The second tries the other deprected function.

onkobu avatar Jan 16 '21 15:01 onkobu

This has been addressed with #168, but while that fix resolves the deprecation error, it is logically wrong. The method DOES still exist in PHP 7.4+. Therefore the if condition always resolves true, which means that ini_set and debug-log will always occur. I'd suggest to either a) completely remove those two blocks or b) to revert the code and check for the PHP version, like this:

if (PHP_VERSION_ID < 70400 && get_magic_quotes_runtime()) {
    set_magic_quotes_runtime(0);
}

@lingej: if you want me to prepare a related Pull request, please let me know which option you prefer.

Cheers, Thomas

NB: Please note that magic quotes have been removed from PHP with version 5.4(!!). So, all of this has no effect at all. Apart from the fix in #168, as it probably produces quite some debug log entries ;-)

Thomas-Gelf avatar Sep 08 '21 09:09 Thomas-Gelf