[wp-trac] [WordPress Trac] #63333: deprecated message using default wp theme 20-13
WordPress Trac
noreply at wordpress.org
Tue Apr 22 17:06:35 UTC 2025
#63333: deprecated message using default wp theme 20-13
--------------------------+------------------------
Reporter: neo2k23 | Owner: (none)
Type: defect (bug) | Status: closed
Priority: normal | Milestone:
Component: Themes | Version:
Severity: normal | Resolution: duplicate
Keywords: | Focuses:
--------------------------+------------------------
Changes (by sabernhardt):
* status: reopened => closed
* component: Bundled Theme => Themes
* milestone: Awaiting Review =>
* keywords: has-testing-info needs-patch =>
* resolution: => duplicate
Old description:
> I get a deprecated message on using a default wp theme 20-13
>
> $title_array = apply_filters( 'wp_title_parts', explode( $t_sep, $title )
> );
>
> <b>Deprecated</b>: explode(): Passing null to parameter #2 ($string) of
> type string is deprecated in <b>/home/public_html/wp-includes/general-
> template.php</b> on line <b>1441</b><br />
> Default theme | Een andere Demo Blog websites site</title>
>
> apparently when line 1439 is reached $title is and can be empty.
>
> changing the code to
>
>
> {{{
> if ( !empty( $title ) ) $title_array = apply_filters(
> 'wp_title_parts', explode( $t_sep, $title ) );
> else $title_array = array();
> }}}
>
> fixes the issue. Please adapt. Thank you
New description:
I get a deprecated message on using a default wp theme 20-13
`$title_array = apply_filters( 'wp_title_parts', explode( $t_sep, $title )
);`
{{{
<b>Deprecated</b>: explode(): Passing null to parameter #2 ($string) of
type string is deprecated in <b>/home/public_html/wp-includes/general-
template.php</b> on line <b>1441</b><br />
Default theme | Een andere Demo Blog websites site</title>
}}}
apparently when line 1439 is reached $title is and can be empty.
changing the code to
{{{
if ( !empty( $title ) ) $title_array = apply_filters(
'wp_title_parts', explode( $t_sep, $title ) );
else $title_array = array();
}}}
fixes the issue. Please adapt. Thank you
--
Comment:
The deprecation notice is already reported on #61352, if you would like to
follow that.
The message can display with any theme from Twenty Ten to Twenty
Fourteen—and probably many more of the
[https://wpdirectory.net/search/01JSEXWP9S9NFXGB63SCRAV6TV directory
themes] that use the `wp_title` function.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/63333#comment:9>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list