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

PHP Depriciated #88

Open
Lokmeup opened this issue Sep 18, 2024 · 4 comments
Open

PHP Depriciated #88

Lokmeup opened this issue Sep 18, 2024 · 4 comments

Comments

@Lokmeup
Copy link

Lokmeup commented Sep 18, 2024

Keep getting these errors:
[18-Sep-2024 04:56:29 UTC] PHP Deprecated: Creation of dynamic property AdminClass::$helpers is deprecated in /home4/etexeate/public_html/wp-content/plugins/custom-404-pro/admin/AdminClass.php on line 6
[18-Sep-2024 04:56:29 UTC] PHP Deprecated: Creation of dynamic property Helpers::$table_options is deprecated in /home4/etexeate/public_html/wp-content/plugins/custom-404-pro/admin/Helpers.php on line 17
[18-Sep-2024 04:56:29 UTC] PHP Deprecated: Creation of dynamic property Helpers::$table_logs is deprecated in /home4/etexeate/public_html/wp-content/plugins/custom-404-pro/admin/Helpers.php on line 18
[18-Sep-2024 04:56:29 UTC] PHP Deprecated: Creation of dynamic property Helpers::$options_defaults is deprecated in /home4/etexeate/public_html/wp-content/plugins/custom-404-pro/admin/Helpers.php on line 19

@timoutright
Copy link

I'm seeing the same errors after updating PHP from 7.4 to 8.2. (which certainly makes sense). Is the plugin not compatible with PHP 8?

@kunalnagar
Copy link
Owner

Thanks for reporting this folks - I'll look into it

@kunalnagar
Copy link
Owner

@timoutright @Lokmeup - Can I get some more info about your setup? I'm using the latest version of the plugin on PHP 8.2, WordPress 6.6.2 i.e. wordpress:6.6.2-php8.2-apache and I don't seem to see any deprecated logs 🤔

@timoutright
Copy link

timoutright commented Nov 12, 2024

Hey @kunalnagar . I'm running all the same versions you listed, but Nginx instead of Apache. According to PHP3.2 docs, those properties need to be explicitly declared within the class. I'm no PHP dev though so don't take my word for it! I'm most easily able to see it running my site locally when I run 'wp plugin list' (or really any wp-cli command).

Is something like this needed in Helpers.php?

`class Helpers {

private $table_options;

private $table_logs;

private $options_defaults;

[etc]

`

https://php.watch/versions/8.2/dynamic-properties-deprecated

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

No branches or pull requests

3 participants