evilru / quake3-vsp-stats

VSP Stats Game Log Processor - updated and working version of vsp-0.45-xp-1.2-full.zip from https://vsp.goquake.com/ as docker image: https://hub.docker.com/r/evilru/quake3-vsp-stats.
MIT License
11 stars 10 forks source link

PHP 8 issue #7

Open jf3218 opened 3 years ago

jf3218 commented 3 years ago

Hello, With php8 Array and string offset access syntax with curly braces is no longer supported so I've fixed the line 3 in vutil.php https://github.com/jf3218/quake3-vsp-stats/commit/8655c0dc446e59662a8e962f5a010f1b0eceacfc

Do you know a alternative to replace get_magic_quotes_gpc() in vsp.php line 1699 ?

evilru commented 3 years ago

Hello,

for the time being, I suggest to stick with php7 as there might be more that needs to be changed. It basically needs to be migrated from php7.4 to php8, at least it needs to be updated where php8 had breaking changes. There is a list on what changed: https://www.php.net/manual/en/migration80.php

They dropped a bunch of long deprecated functions like get_magic_quotes_gpc and beside that, there might be changes in how things work.

Regarding get_magic_quotes_gpc, you can just drop all if statements where it is being used. This is exactly where I stopped a while ago.

You are more than welcome to contribute! :)

Best, Martin

evilru commented 3 years ago

Hello,

I gave it another try and it looks like its working now. It outputs warnings during import but seems to work.

Maybe you want to give it a try? https://github.com/evilru/quake3-vsp-stats/tree/php8

Still need to check if it creates the same data as the master branch.

Best, Martin

jf3218 commented 3 years ago

Hello, I confirm that work for me too https://prnt.sc/10tu5te and I have also those warning.

Thank for the link I will take a look, I dont know much php code but if I can help I will do it with pleasure.