Skip to content

Undefined array key warnings and htmlspecialchars() deprecated messages #731

@vmanthos

Description

@vmanthos

Before submitting an issue please check that you’ve completed the following steps:

  • Made sure you’re on the latest version develop branch
  • Used the search feature to ensure that the bug hasn’t been reported before ✔️

Describe the bug

The following appear in the debug.log after the changes in #722

PHP Warning:  Undefined array key "orderby" in /var/www/example.com/htdocs/wp-content/plugins/imagify-plugin/inc/classes/class-imagify-files-list-table.php on line 102
PHP Deprecated:  htmlspecialchars(): Passing null to parameter #1 ($string) of type string is deprecated in /var/www/example.com/htdocs/wp-content/plugins/imagify-plugin/inc/classes/class-imagify-files-list-table.php on line 102
PHP Warning:  Undefined array key "order" in /var/www/example.com/htdocs/wp-content/plugins/imagify-plugin/inc/classes/class-imagify-files-list-table.php on line 103
PHP Deprecated:  htmlspecialchars(): Passing null to parameter #1 ($string) of type string is deprecated in /var/www/example.com/htdocs/wp-content/plugins/imagify-plugin/inc/classes/class-imagify-files-list-table.php on line 103
PHP Warning:  Undefined array key "status-filter" in /var/www/example.com/htdocs/wp-content/plugins/imagify-plugin/inc/classes/class-imagify-files-list-table.php on line 1034
PHP Warning:  Undefined array key "option_page" in /var/www/example.com/htdocs/wp-content/plugins/imagify-plugin/inc/classes/class-imagify-settings.php on line 134
PHP Deprecated:  htmlspecialchars(): Passing null to parameter #1 ($string) of type string is deprecated in /var/www/example.com/htdocs/wp-content/plugins/imagify-plugin/inc/classes/class-imagify-settings.php on line 134

To Reproduce

Steps to reproduce the behavior:

  1. Go to Imagify's settings page, change one of the settings, and save the changes.
  2. Visit the "Other Media" page: Media > "Other Media".
  3. Check the debug.log.

Expected behavior

No warnings should be there in the debug.log.

Screenshots
N/A

Additional context
N/A

Backlog Grooming (for WP Media dev team use only)

  • Reproduce the problem
  • Identify the root cause
  • Scope a solution
  • Estimate the effort

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions