Skip to content

Commit

Permalink
Merge pull request #1227 from 10up/fix/strpos-warning
Browse files Browse the repository at this point in the history
Fix strpos first arg null warning in php 8.1
  • Loading branch information
jeffpaul authored Jul 8, 2024
2 parents 937db64 + 72626fb commit 5774e61
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion includes/settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,11 @@ function update_notice( $plugin_file, $plugin_data, $status ) {
* @since 1.2
*/
function maybe_notice() {
if ( 0 === strpos( get_current_screen()->parent_base, 'distributor' ) ) {
$parent_base = get_current_screen()->parent_base;
if ( ! $parent_base ) {
return;
}
if ( 0 === strpos( $parent_base, 'distributor' ) ) {
if ( Utils\is_development_version() ) {
?>
<div class="notice notice-warning">
Expand Down

0 comments on commit 5774e61

Please sign in to comment.