pnp4nagios
pnp4nagios copied to clipboard
Function get_magic_quotes_runtime() is deprecated
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.
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 ;-)