diff --git a/wp-content/themes/pub/wporg-learn-2024/inc/block-hooks.php b/wp-content/themes/pub/wporg-learn-2024/inc/block-hooks.php index 73b77ddea..5f51defde 100644 --- a/wp-content/themes/pub/wporg-learn-2024/inc/block-hooks.php +++ b/wp-content/themes/pub/wporg-learn-2024/inc/block-hooks.php @@ -179,6 +179,9 @@ function update_quiz_actions( $block_content ) { function is_quiz_ungraded() { $lesson_id = Sensei_Utils::get_current_lesson(); $quiz_id = Sensei()->lesson->lesson_quizzes( $lesson_id ); + if ( ! $quiz_id ) { + return false; + } $user_id = get_current_user_id(); $quiz_progress = Sensei()->quiz_progress_repository->get( $quiz_id, $user_id );