jacobwb / hashover-next

This branch will be HashOver 2.0
GNU Affero General Public License v3.0
420 stars 87 forks source link

Hashover 2.0 does not work under PHP 8.2 #335

Open Torsten-K opened 1 year ago

Torsten-K commented 1 year ago

Hashover 2.0 does not work under PHP 8.2 on Apache. I receive an error message and a white page:

Deprecated: Creation of dynamic property HashOver\SpamCheck::$ip is deprecated in […]/hashover/backend/classes/spamcheck.php on line 36

Furthermore, login fails with several fatal errors.

jacobwb commented 1 year ago

Thank you for reporting this, I have yet to test HashOver on PHP 8.2. This change to the language is good. Most of my code is already written to avoid this warning, as dynamic class properties is frowned upon in my coding standard. However, it looks like class properties are being set dynamically in a few places by accident. I will try to get my hands on PHP 8.2 and fix these issues, but in any case, this issue should be fixed when 8.2 is officially released later this month.

Torsten-K commented 1 year ago

Ah, that sounds nice, thanks for your efforts!

jacobwb commented 1 year ago

Can you please give the latest code another try?

Torsten-K commented 1 year ago

Yes, with pleasure, but not until tomorrow, I think.

Torsten-K commented 1 year ago

Uhm, where can I download the latest code? It does not seem to have changed (master branch).

jacobwb commented 1 year ago

You would get it the normal way, with a git pull. If you think you have the latest code, can you please see if it is giving you a different error?

Torsten-K commented 1 year ago

Sorry for the late reply, I did not find the time to test again, until today. Good news: I can confirm that the latest code works under PHP 8.2.

Only a warning appears in the admin backend, but it is not very annoying and does not seem to affect the functionality: _Warning: file_exists(): openbasedir restriction in effect. File(/docs/de-de) is not within the allowed path(s): (/var/www/[…]:/usr/share/php) in /var/www/[…]/html/[…]/hashover/admin/view-setup.php on line 67