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

fix(tutor_permission_denied_template): call die() instead of return to correctly end execution of code #685

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions includes/tutor-template-functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -1583,7 +1583,7 @@ function tutor_enrolled_course_progress() {
/**
* Load permission denied template
*
* It will load permission denied template & return so not code
* It will load permission denied template & die so no code
* after this will execute
*
* @since 2.2.0
Expand All @@ -1608,6 +1608,6 @@ function tutor_permission_denied_template( int $post_id = 0 ) {
);

tutor_load_template( 'permission-denied', $args );
return;
die();
}
}