Browse Source

Update scholartokens.module

You can't explode NULL anymore.
main
Alan Stanley 2 years ago committed by GitHub
parent
commit
e8dfa80b5b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 3
      scholartokens.module

3
scholartokens.module

@ -75,6 +75,9 @@ function scholartokens_format_date($node) {
$config = \Drupal::config('scholartokens.settings');
$field = $config->get('field');
$original = $node->get($field)->value;
if (!$original) {
return '';
}
$date_parts = explode('-', $original);
if (count($date_parts) == 1) {
$replacement = $date_parts[0];

Loading…
Cancel
Save