mrclay / minify

Combines. minifies, and serves CSS or Javascript files
BSD 3-Clause "New" or "Revised" License
3.01k stars 472 forks source link

get_magic_quotes_gpc still used thus does not work properly in PHP 8.0 and later #702

Closed jugantner2 closed 1 year ago

jugantner2 commented 1 year ago

In file lib/HTTP/ConditionalGet.php:319 the deprecated (in PHP 8.0 and later removed) function get_magic_quotes_gpc is used:

$clientEtagList = get_magic_quotes_gpc() ? stripslashes($_SERVER['HTTP_IF_NONE_MATCH']) : $_SERVER['HTTP_IF_NONE_MATCH'];

I suggest to replace it with: $clientEtagList = $_SERVER['HTTP_IF_NONE_MATCH'];

It worked for me.

Thanks, Julian

glensc commented 1 year ago

Version info missing. This is already fixed:

jugantner2 commented 1 year ago

Thanks Elan, I downloaded the latest release source 3.0.4 which is from 2019, so the issue is not fixed in this version. Do you plan to release a new version with all current fixed and changes? Thanks, Julian

glensc commented 1 year ago

latest tag is 3.0.13:

See the changelog:

BillyGeat commented 3 months ago

For unknown reasons, the change / merge you made to solve this is gone and the "$clientEtagList = PHP_VERSION_ID < 50400 && get_magic_quotes_gpc()" is still / back there at line 320. I downloaded the lattest v4 and also checked the file in the source tree here, both have the old code inside. So, it does not work anymore in PHP v8+

glensc commented 3 months ago

The change is correct: