Code includes var_dump() statement

ForumCategory: TechnicalCode includes var_dump() statement
truckeesolutions asked 1 month ago

While chasing down how the left sidebar menu was determined I discovered the following in …/uua-congregation/lib/content-nav.php:

function uuatheme_check_for_page_tree() {

//start by checking if we’re on a page
if( is_page() ) {

global $post;

// next check if the page has parents
if ( $post->post_parent ){

// fetch the list of ancestors
$parents = array_reverse( get_post_ancestors( $post->ID ) );
// get the top level ancestor
return $parents[0];


// return the id – this will be the topmost ancestor if there is one, or the current page if not
return $post->ID;


Note the existence of var_dump($parents); on line 19. This is decidedly not good practice. Is the intention to cease script execution and dump?

1 Answers
truckeesolutions answered 1 month ago

The var_dump() statement occurred in a copy of the script with unknown provenance.  It does NOT appear in the live code.  Apologies