Sarjuuk / aowow

Database viewer for TrinityCore based on aowow by @LordJZ, based on the JS-Engine of Wowhead
204 stars 217 forks source link

Php8.0 is not supported #298

Closed qyh214 closed 3 years ago

qyh214 commented 3 years ago

commit: 56e70e22bba81692670199c292c231ab0c113cdb php: 8.0.3 server: windows 10 (apache ) issue: a lot of issues and warnings

I suggest indicating the currently supported PHP versions in the project description, or considering using Ci to list the support of different PHP versions

then I test in php 7.1.33( the last version of php 7.1) all seems well.

jackpoz commented 3 years ago

Ubuntu 21.10 ships with php 8 (and aowow stops working right after the upgrade).

Sarjuuk commented 3 years ago

thats going to be a fun weekend..

but that needs to be tackled at some point

jackpoz commented 3 years ago

I will use this issue as my personal blog in this adventure that is PHP 8.

1st issue: on windows $_SERVER['QUERY_STRING'] is null when querystring doesn't contain any parameter. Fixed with a simple ?? '' https://github.com/Sarjuuk/aowow/pull/310/commits/e10b3d6978809253d7fec6a7b9d14b35ff0a892f

2nd issue: https://php.watch/versions/8.0/non-static-static-call-fatal-error is_callable returns false where it returned true before, breaking index.php exception catcher and showing 404 page https://github.com/Sarjuuk/aowow/pull/310/commits/e10b3d6978809253d7fec6a7b9d14b35ff0a892f

Opened a PR at https://github.com/Sarjuuk/aowow/pull/310

jackpoz commented 3 years ago

issue: a lot of issues and warnings

@qyh214 any chance on getting the list of issues and warnings ?

jackpoz commented 3 years ago

https://tcubuntu.northeurope.cloudapp.azure.com/aowow/ updated to php 8

jackpoz commented 3 years ago

3rd issue: "Cannot access offset of type string on string" in smartAI.class.php when loading /?npc=68 , caused by using selectCol instead of select and trying to access the result (which is only the value of the first column) as a row badefc413b550d83e77a2292cb9a094cff368cc2

Sarjuuk commented 3 years ago

php v8.0 should be supported with 6819c1b1f2621b28d5ad2e6d5ef508e4141b67fc rough tests indicate php 7.x is also still working

lets hope i didn't miss anything