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

Arma3 on php 8.0 gives a deprecation notice #589

Closed
silent001 opened this issue Jan 11, 2022 · 4 comments · Fixed by #609
Closed

Arma3 on php 8.0 gives a deprecation notice #589

silent001 opened this issue Jan 11, 2022 · 4 comments · Fixed by #609
Labels
Bug This request does fix a bug. Help Wanted Need help with a solution v3

Comments

@silent001
Copy link

silent001 commented Jan 11, 2022

On PHP 8.0 I get a depreciation notice as follows:

<b>Deprecated</b>: Invalid characters passed for attempted conversion, these have been ignored in <b>/var/www/public/src/GameQ/Protocols/Arma3.php</b> on line <b>156</b><br />

This is referenced in the php manual here for the hexdec() function in php 7.4 and up `

Version Description
7.4.0 Passing invalid characters will now generate a deprecation notice. The result will still be computed as if the invalid characters did not exist.
`

A dirty workaround is to put the following line near the top of the file:

error_reporting(E_ALL ^ E_DEPRECATED);

Not sure the correct workaround to fix this for all versions of php as the manual does not say much

@Austinb Austinb added Bug This request does fix a bug. Help Wanted Need help with a solution v3 labels Feb 11, 2022
@Austinb
Copy link
Owner

Austinb commented Feb 11, 2022

Can you provide a working example of when this notice is thrown? It appears is the the code deciphering the steam_id server info property. Has this value changed?

@bumbummen99
Copy link
Collaborator

Is this not a duplicate of #546 ?

@silent001
Copy link
Author

I can give you a working Arma 3 server to query.

$IP = ddns.silentmecha.co.za
$PORT = 2302

@bumbummen99
Copy link
Collaborator

I can give you a working Arma 3 server to query.

$IP = ddns.silentmecha.co.za
$PORT = 2302

Afaik it wont work due to the reason in the liked issue (if you are on PHP >=7.4) and there will be issues with DLC since the hashes do change on update and they are outdated here (this was an issue for my ArmA3 server some months ago).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug This request does fix a bug. Help Wanted Need help with a solution v3
Projects
None yet
3 participants