Skip to content

PHP Deprecation Notice: strip_tags(): Passing null #46214

@westonruter

Description

@westonruter

Impacted plugin

Jetpack

Quick summary

I just noticed that on the Modules page (/admin.php?page=jetpack_modules) and the Debug page (/admin.php?page=jetpack-debugger) I'm seeing a PHP deprecation notice:

Deprecated: strip_tags(): Passing null to parameter #1 ($string) of type string is deprecated in …/wp-admin/admin-header.php on line 41

This is the error location in admin-header.php:

get_admin_page_title();
$title = strip_tags( $title );

Apparently Jetpack isn't defining any $title global variable for these custom admin pages, and get_admin_page_title() isn't able to generate one because the Debug and Modules admin screens are not registered in the admin menu.

The TITLE tag for these admin screens shows as:

<title> &lsaquo; My Site &#8212; WordPress</title>

Note there is no page title included here.

Steps to reproduce

  1. Enable PHP 8.2 (at least).
  2. Activate Jetpack
  3. Enable SCRIPT_DEBUG
  4. Go to the the Blocks or Debug admin pages for Jetpack.
  5. See notice.

Site owner impact

More than 60% of the total website/platform users

Severity

Minor

What other impact(s) does this issue have?

No revenue impact

If a workaround is available, please outline it here.

No response

Platform (Simple and/or Atomic)

Self-hosted

Metadata

Metadata

Assignees

Labels

Admin PageReact-powered dashboard under the Jetpack menuBugWhen a feature is broken and / or not performing as intendedNeeds triageTicket needs to be triaged[Plugin] JetpackIssues about the Jetpack plugin. https://wordpress.org/plugins/jetpack/[Pri] Normal[Status] Auto-allocated

Type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions