From 523479f53cbd99d4e0e5a4232f8397b4f323bb25 Mon Sep 17 00:00:00 2001 From: Mohammad Zubair Ali Date: Thu, 12 Sep 2024 14:49:26 +0530 Subject: [PATCH] fixed php warning --- php/classes/class-qmn-quiz-manager.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/php/classes/class-qmn-quiz-manager.php b/php/classes/class-qmn-quiz-manager.php index 0bfc86ef6..6dfecc3b4 100644 --- a/php/classes/class-qmn-quiz-manager.php +++ b/php/classes/class-qmn-quiz-manager.php @@ -2404,8 +2404,8 @@ public static function check_answers( $options, $quiz_data ) { $results_array = apply_filters( 'qmn_results_array', $results_array, $question ); // If question was graded correctly. if ( ! isset( $results_array['null_review'] ) ) { - $points_earned += (float)$results_array['points']; - $answer_points += (float)$results_array['points']; + $points_earned += isset($results_array['points']) ? (float)$results_array['points'] : 0; + $answer_points += isset($results_array['points']) ? (float)$results_array['points'] : 0; // If the user's answer was correct. if ( isset( $results_array['correct'] ) && ( 'correct' == $results_array['correct'] ) ) { $total_correct += 1;