Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
jugantner2 opened this issue Jan 26, 2023 · 5 comments

Comments

@jugantner2
Copy link

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
Copy link
Collaborator

glensc commented Jan 26, 2023

Version info missing. This is already fixed:

@glensc glensc closed this as completed Jan 26, 2023
@jugantner2
Copy link
Author

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
Copy link
Collaborator

glensc commented Jan 26, 2023

@BillyGeat
Copy link

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+

Repository owner locked as resolved and limited conversation to collaborators Jun 26, 2024
@glensc
Copy link
Collaborator

glensc commented Jun 26, 2024

The change is correct:

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants