Skip to content

Commit

Permalink
Undefined array key error when viewing pages in admin panel
Browse files Browse the repository at this point in the history
  • Loading branch information
xDehy committed Jul 22, 2024
1 parent b1b046a commit 26ce4c7
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions class-simple-page-ordering.php
Original file line number Diff line number Diff line change
Expand Up @@ -435,10 +435,14 @@ public static function page_row_actions( $actions, $post ) {

// Get the relevant siblings.
if ( 0 === $post->post_parent ) {
$siblings = $top_level_pages;
} else {
$siblings = $children_pages[ $post->post_parent ];
}
$siblings = $top_level_pages;
} else {
if (isset($children_pages[$post->post_parent])) {
$siblings = $children_pages[$post->post_parent];
} else {
$siblings = [];
}
}

// Assume no sibling.
$sibling = 0;
Expand Down

0 comments on commit 26ce4c7

Please sign in to comment.