In WP_Posts_List_Table::single_row()
:
* `get_the_terms()` can return `WP_Error`, so its return value should be checked before traversing. * Correct the `@param` doc blocks See #32444. git-svn-id: https://develop.svn.wordpress.org/trunk@32738 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
cae366cad0
commit
8463ad6f29
@ -674,8 +674,8 @@ class WP_Posts_List_Table extends WP_List_Table {
|
|||||||
* @global string $mode
|
* @global string $mode
|
||||||
* @global WP_Post $post
|
* @global WP_Post $post
|
||||||
*
|
*
|
||||||
* @param WP_Post $post
|
* @param int|WP_Post $post
|
||||||
* @param int $level
|
* @param int $level
|
||||||
*/
|
*/
|
||||||
public function single_row( $post, $level = 0 ) {
|
public function single_row( $post, $level = 0 ) {
|
||||||
global $mode;
|
global $mode;
|
||||||
@ -886,7 +886,8 @@ class WP_Posts_List_Table extends WP_List_Table {
|
|||||||
|
|
||||||
if ( $taxonomy ) {
|
if ( $taxonomy ) {
|
||||||
$taxonomy_object = get_taxonomy( $taxonomy );
|
$taxonomy_object = get_taxonomy( $taxonomy );
|
||||||
if ( $terms = get_the_terms( $post->ID, $taxonomy ) ) {
|
$terms = get_the_terms( $post->ID, $taxonomy );
|
||||||
|
if ( is_array( $terms ) ) {
|
||||||
$out = array();
|
$out = array();
|
||||||
foreach ( $terms as $t ) {
|
foreach ( $terms as $t ) {
|
||||||
$posts_in_term_qv = array();
|
$posts_in_term_qv = array();
|
||||||
|
Loading…
Reference in New Issue
Block a user