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

Deprecation notices for php 8.1 and 8.2. #301

Open
OllieJones opened this issue Jun 20, 2023 · 0 comments
Open

Deprecation notices for php 8.1 and 8.2. #301

OllieJones opened this issue Jun 20, 2023 · 0 comments
Labels

Comments

@OllieJones
Copy link

Description

I'm a user of APF (to drive an admin page).
When I test my plugin on php8.1 and php8.2, I get quite a few deprecation warnings.

Deprecated: Creation of dynamic property Imfs_AdminPageFramework_Form_admin_page::$aSections is deprecated in /var/www/html/wp-content/plugins/index-wp-mysql-for-speed/afp/factory/admin_page/AdminPageFramework.php on line 85

Deprecated: Creation of dynamic property Imfs_AdminPageFramework_TabNavigationBar::$aActiveSlugs is deprecated in /var/www/html/wp-content/plugins/index-wp-mysql-for-speed/afp/factory/_common/_abstract/_view/AdminPageFramework_TabNavigationBar.php on line 16

Deprecated: strip_tags(): Passing null to parameter #1 ($string) of type string is deprecated in /var/www/html/wp-content/plugins/index-wp-mysql-for-speed/afp/factory/_common/form/_view/sectionset/AdminPageFramework_Form_View___FieldTitle.php on line 33

Deprecated: explode(): Passing null to parameter #2 ($string) of type string is deprecated in /var/www/html/wp-content/plugins/index-wp-mysql-for-speed/afp/factory/_common/utility/base_utility/AdminPageFramework_Utility.php on line 570

Steps to reproduce

  1. Install index_wp_mysql_for_speed on a website running with php 8.1 or php 8.2.
  2. Enable WP_DEBUG and WP_DEBUG_LOG.
  3. Visit Tools -> Index MySQL

Observe deprecation notices.

I'm sending a PR soon. Some of this may duplicate #298.

Screenshots, screen recording clips, or code snippets

No response

Environment

Ubuntu 20, php 8.1 or 8.2

Please confirm that you have searched existing issues in this repository.

Yes

Please confirm that the problem occurs with the default theme and all the plugins deactivated except "Admin Page Framework - Loader".

Yes

@OllieJones OllieJones added the Bug label Jun 20, 2023
OllieJones added a commit to OllieJones/admin-page-framework that referenced this issue Jun 20, 2023
Substitute empty strings for null values in some calls to explode() and strip_tags().
Declare some class properties to eliminate dynamic property declarations.

This work is done in two places: /development/ and /library/. I don't understand your build workflow, so I just modified both copies of the software.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant