こんにちは、Wordpress のインクルードのエラーが表示されます。分類法の複数の値を index.php に投稿すると、このエラーが表示されます。
<form role="search" method="post" id="searchform" action="<?php echo home_url( '/' ); ?>">
<select name="books[]" multiple>
<option value="a">a</option>
<option value="b">b</option>
</select>
<input type="submit" id="searchsubmit" value="Search" />
</form>
警告: strpos() は、パラメーター 1 が文字列であると想定しています。1718 行目のwww.domain.com\wordpress\wp-includes\query.phpで指定された配列警告: preg_split () は、パラメーター 2 が文字列であり、配列がwww. 1719行目の domain.com\wordpress\wp-includes\query.php警告: 1720行目の www.domain.com\wordpress\wp-includes\query.phpの foreach() に無効な引数が指定されました
foreach ( $GLOBALS['wp_taxonomies'] as $taxonomy => $t ) {
if ( 'post_tag' == $taxonomy )
continue; // Handled further down in the $q['tag'] block
if ( $t->query_var && !empty( $q[$t->query_var] ) ) {
$tax_query_defaults = array(
'taxonomy' => $taxonomy,
'field' => 'slug',
);
if ( isset( $t->rewrite['hierarchical'] ) && $t->rewrite['hierarchical'] ) {
$q[$t->query_var] = wp_basename( $q[$t->query_var] );
}
$term = $q[$t->query_var];
if ( strpos($term, '+') !== false ) {
$terms = preg_split( '/[+]+/', $term );
foreach ( $terms as $term ) {
$tax_query[] = array_merge( $tax_query_defaults, array(
'terms' => array( $term )
) );
}
} else {
$tax_query[] = array_merge( $tax_query_defaults, array(
'terms' => preg_split( '/[,]+/', $term )
) );
}
}
}
エラーは、searchresults.php に投稿したり、単一の値またはタクソノミー名を使用しない場合に表示されません。
<select name="books">
<select name="NoneTaxonomyName[]" multiple>
誰かがこれを解決する方法を知っていますか?