xwp / stream

🗄️ Stream plugin for WordPress
https://wordpress.org/plugins/stream/
GNU General Public License v2.0
405 stars 119 forks source link

PHP 8.1: strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated #1439

Closed ocean90 closed 10 months ago

ocean90 commented 1 year ago

Bug Report

On every admin page where no page is set in $_GET you get a PHP deprecation warning caused by Admin::is_stream_screen()

strpos(): Passing null to parameter #​1 ($haystack) of type string is deprecated

Expected Behavior

No deprecation warning.

Actual Behavior

A deprecation warning is logged.

Steps to Reproduce the Problem

  1. Set up a site with PHP 8 with error reporting set to E_ALL
  2. Go to /wp-admin/
  3. Notice the deprecation warning in the logs

Screenshots

Drag and drop screenshots in this area that help illustrate the problem.

System Information