Skip to content

Commit

Permalink
Merge pull request #2653 from QuizandSurveyMaster/CU-86cwm41zd-Resolv…
Browse files Browse the repository at this point in the history
…e-warning-issue

Resolve warning issue in %TIME_FINISHED% variable
  • Loading branch information
zubairraeen authored Sep 27, 2024
2 parents 76a4951 + 9b0e9d6 commit 2152dca
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion php/template-variables.php
Original file line number Diff line number Diff line change
Expand Up @@ -637,7 +637,7 @@ function mlw_qmn_variable_date( $content, $results ) {
* @return string Returns the contents for the results page
*/
function mlw_qmn_variable_finished_time( $content, $mlw_quiz_array ) {
$date = date_i18n( get_option( 'time_format' ), $mlw_quiz_array['time_taken'] );
$date = isset( $mlw_quiz_array['time_taken'] ) ? date_i18n( get_option( 'time_format' ), $mlw_quiz_array['time_taken'] ) : '';
$content = str_replace( '%TIME_FINISHED%', $date, $content );
return $content;
}
Expand Down

0 comments on commit 2152dca

Please sign in to comment.