Alexia / php7mar

PHP 7 Migration Assistant Report (MAR)
GNU General Public License v3.0
797 stars 133 forks source link

Fixed incorrectly identifying get_magic_quotes_runtime as deprecated #52

Open mheesters opened 5 years ago

mheesters commented 5 years ago

I'm getting results like these:

/var/www/something/FileByteStream.php
deprecatedFunctions
Line 42: if (function_exists('get_magic_quotes_runtime') && @get_magic_quotes_runtime() == 1) {

It looks like the script falsely identifies get_magic_quotes_runtime as being a deprecated function.

It's not: https://www.php.net/manual/en/function.get-magic-quotes-runtime.php whereare magic_quotes_runtime is indeed deprecated: https://www.php.net/manual/en/function.magic-quotes-runtime.php

I've extented the regex so that the target shouldn't be preceded by a underscore.