Skip to content

Commit

Permalink
Fix uncaught error: call to a member function get_status().
Browse files Browse the repository at this point in the history
  • Loading branch information
renintw committed Sep 23, 2024
1 parent eed930c commit c529d11
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion wp-content/themes/pub/wporg-learn-2024/inc/block-hooks.php
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ function is_quiz_ungraded() {
$user_id = get_current_user_id();
$quiz_progress = Sensei()->quiz_progress_repository->get( $quiz_id, $user_id );

if ( 'ungraded' === $quiz_progress->get_status() ) {
if ( $quiz_progress && 'ungraded' === $quiz_progress->get_status() ) {
return true;
}

Expand Down

0 comments on commit c529d11

Please sign in to comment.