error php … is not a array

this message is seen in search bar or if page do not exist

Warning: array_filter() expects parameter 1 to be array, null given in
/homepages/8/d485314159/htdocs/mondomain/wp-includes/general-template.php
on line 1075

Warning: implode(): Invalid arguments passed in
/homepages/8/d485314159/htdocs/mondomain/wp-includes/general-template.php
on line 1075

cette ligne 1075 est $title = implode( ” $sep “, array_filter( $title ) );

my php is 7.2
line 1075 is $title = apply_filters( ‘document_title_parts’, $title );

how to resolve 🙂 i’m a beginner in php
this is partial of the general-template.php

/**

* Filters the separator for the document title.
*
* @since 4.4.0
*
* @param string $sep Document title separator. Default ‘-‘.
*/
$sep = apply_filters( ‘document_title_separator’, ‘-‘ );

/**
* Filters the parts of the document title.
*
* @since 4.4.0
*
* @param array $title {
* The document title parts.
*
* @type string $title Title of the viewed page.
* @type string $page Optional. Page number if paginated.
* @type string $tagline Optional. Site description when on home page.
* @type string $site Optional. Site title when not on home page.
* }
*/
**

$title = apply_filters( ‘document_title_parts’, $title );**

$title = implode( ” $sep “, array_filter( $title ) );
$title = wptexturize( $title );
$title = convert_chars( $title );
$title = esc_html( $title );
$title = capital_P_dangit( $title );

return $title;

Read more here:: error php … is not a array

Leave a Reply

Your email address will not be published. Required fields are marked *