Skip to content

Commit

Permalink
Fixed tokens without a description value were treated as wrong.
Browse files Browse the repository at this point in the history
  • Loading branch information
klonos committed Aug 4, 2023
1 parent f32837d commit 3e1b45c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions core/includes/token.inc
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,7 @@ function token_get_token_problems() {
'label' => t('The following tokens or token types are not defined as arrays:'),
),
'missing-info' => array(
'label' => t('The following tokens or token types are missing required name and/or description information:'),
'label' => t('The following tokens or token types are missing required name information:'),
),
'type-no-tokens' => array(
'label' => t('The following token types do not have any tokens defined:'),
Expand All @@ -428,7 +428,7 @@ function token_get_token_problems() {
$token_problems['not-array']['problems'][] = "\$info['types']['$type']";
continue;
}
elseif (!isset($type_info['name']) || !isset($type_info['description'])) {
elseif (!isset($type_info['name'])) {
$token_problems['missing-info']['problems'][] = "\$info['types']['$type']";
}
elseif (empty($token_info['tokens'][$real_type])) {
Expand All @@ -448,7 +448,7 @@ function token_get_token_problems() {
$token_problems['not-array']['problems'][] = "\$info['tokens']['$type']['$token']";
continue;
}
elseif (!isset($tokens[$token]['name']) || !isset($tokens[$token]['description'])) {
elseif (!isset($tokens[$token]['name'])) {
$token_problems['missing-info']['problems'][] = "\$info['tokens']['$type']['$token']";
}
elseif (is_array($tokens[$token]['name']) || is_array($tokens[$token]['description'])) {
Expand Down

0 comments on commit 3e1b45c

Please sign in to comment.