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 Deprecated: strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated when hover admin bar while api key is invalid #961

Open
Mai-Saad opened this issue Jan 27, 2025 · 0 comments

Comments

@Mai-Saad
Copy link

Mai-Saad commented Jan 27, 2025

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

  • Made sure you’re on the latest version=> 2.2.4
  • Used the search feature to ensure that the bug hasn’t been reported before

Describe the bug
When hover the admin bar while API key is invalid, a deprecation notice is in debug.log

To Reproduce
Steps to reproduce the behavior:

  1. fresh install /activate of imagify 2.2.4
  2. open settings page
  3. Add invalid key and save
  4. hover imagify in admin bar
  5. check debug.log
    [27-Jan-2025 10:54:17 UTC] PHP Deprecated: strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /home/dell/Local Sites/apache2025/app/public/wp-content/plugins/imagify/views/admin/admin-bar-status.php on line 4

Expected behavior
No deprecation notice in debug.log

Test Environment

  • WordPress: 6.7.1
  • PHP: 8.3.11
  • Server: Apache/2.4.43 (Unix)
  • Database: mysqli (Server: 8.0.35 / Client: mysqlnd 8.3.11)
  • Browser: Chrome 131.0.0.0
  • OS: Linux
  • Theme: Twenty Twenty-Four 1.3
  • Plugins:
    • Code Snippets 3.6.6.1
    • Imagify 2.2.4
    • Query Monitor 3.17.0
    • Regenerate Thumbnails 3.1.6
    • Test Reports 1.2.0
    • Transients Manager 2.0.7
    • WP Rollback 2.0.7

Acceptance Criteria (for WP Media team use only)
Clear instructions for developers, to be added before the grooming

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

No branches or pull requests

1 participant