phpWhois icon indicating copy to clipboard operation
phpWhois copied to clipboard

eval in generic_parser_b will fail on some domains (solution within)

Open newalphamedia opened this issue 5 years ago • 1 comments

The line:

eval($var . '="' . str_replace('"', '\"', $itm) . '";');

Should be:

$itm = rtrim($itm,"\\"); eval($var . '="' . str_replace('"', '\"', $itm) . '";');

Because if $itm has a \ at the end of the value, it will trigger a ParseError.

newalphamedia avatar Mar 02 '20 14:03 newalphamedia

Thanks for the tip!

I will import this fix in my version of packagist: kevinoo/phpwhois

Have a nice day!

kevinoo avatar Mar 21 '23 22:03 kevinoo