Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added Error Handling for Null Child in Nested Tabs Widget #25912

Open
wants to merge 13 commits into
base: main
Choose a base branch
from
4 changes: 4 additions & 0 deletions modules/nested-tabs/widgets/nested-tabs.php
Original file line number Diff line number Diff line change
Expand Up @@ -1152,6 +1152,10 @@ public function print_child( $index, $item_settings = [] ) {
if ( isset( $children[ $index ] ) ) {
$children[ $index ]->print_element();
}
else {
// Handle the error appropriately
error_log("Child with index {$index} does not exist.");
}
remove_filter( 'elementor/frontend/container/should_render', $add_attribute_to_container );
}

Expand Down
Loading