w3c / i18n-checker

W3C's i18n checker
https://validator.w3.org/i18n-checker/
Other
35 stars 17 forks source link

Fix PHP error #77

Closed tripu closed 6 years ago

tripu commented 6 years ago

Using PHP 7.1.17 on Ubuntu Linux, I got this error:

PHP Fatal error:
Cannot use auto-global as lexical variable
in /src/class.Net.php
on line 165

Apparently, “since PHP 5.4, you cannot use a superglobal as the parameter to a function”.

I think this fixes that. Can someone who is more knowledgeable confirm I'm not breaking anything?

(Make sure you check the option “hide whitespace changes” in the diff.)

tripu commented 6 years ago

@r12a, code editors and IDEs now tend to remove trailing spaces by default before saving files (I think that's a good thing). In @ylafon's new PR (#78), the other “normalisation” causing spurious changes is converting some files from CRLF lines (Windows) to LF lines (Unix, MacOS).

As said above, you can always see diffs with the option “hide whitespace changes” checked to focus on the most important changes.