Skip to content

Commit

Permalink
Merge pull request #2593 from QuizandSurveyMaster/CU-86cvt9mpw-undefi…
Browse files Browse the repository at this point in the history
…ned-array-key-issue

Cu 86cvt9mpw undefined array key issue
  • Loading branch information
randhirexpresstech authored Jun 26, 2024
2 parents 5593f43 + 6682940 commit 59c0079
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions php/classes/class-qsm-questions.php
Original file line number Diff line number Diff line change
Expand Up @@ -487,7 +487,7 @@ public static function get_question_categories_from_term_ids( $term_ids ) {
$categories_names[ $tax->term_id ] = $tax->name;
$taxs[ $tax->parent ][] = $tax;
}
$categories_tree = self::create_terms_tree( $taxs, $taxs[0] );
$categories_tree = self::create_terms_tree( $taxs, isset( $taxs[0] ) ? $taxs[0] : reset( $taxs ) );
}
$categories = array(
'list' => $categories_names,
Expand Down Expand Up @@ -527,7 +527,7 @@ public static function get_question_categories( $question_id = 0 ) {
$categories_names[ $tax->term_id ] = $tax->name;
$taxs[ $tax->parent ][] = $tax;
}
$categories_tree = self::create_terms_tree( $taxs, $taxs[0] );
$categories_tree = self::create_terms_tree( $taxs, isset( $taxs[0] ) ? $taxs[0] : reset( $taxs ) );

}
}
Expand Down

0 comments on commit 59c0079

Please sign in to comment.