From 9f83033f8b8fb66e9d1af9368fa4f49227d62fd8 Mon Sep 17 00:00:00 2001 From: Alexander O'Neill Date: Mon, 19 Nov 2018 14:20:52 -0400 Subject: [PATCH] Fix PHP notices. --- bibcite_footnotes.module | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/bibcite_footnotes.module b/bibcite_footnotes.module index 5162d89..841d99a 100644 --- a/bibcite_footnotes.module +++ b/bibcite_footnotes.module @@ -112,7 +112,7 @@ function bibcite_footnotes_preprocess_bibcite_footnote_list(&$variables) { $override_page_in_citation = FALSE; } - if ($fn['ibid']) { + if (isset($fn['ibid']) && $fn['ibid']) { $build['footnote-text'] = [ '#type' => 'markup', '#markup' => ' ' @@ -131,7 +131,7 @@ function bibcite_footnotes_preprocess_bibcite_footnote_list(&$variables) { } if (!empty($reference_entity_id)) { - if (!$fn['ibid']) { + if (empty($fn['ibid'])) { $citation_build = $citation_tools->getRenderableReference($reference_entity_id); if ($override_page_in_citation) { $citation_build['#data']['page'] = $override_page_in_citation; @@ -200,5 +200,7 @@ function bibcite_footnotes_preprocess_bibcite_footnote_link(&$variables) { $link = Link::fromTextAndUrl($fn['value'], $url)->toRenderable(); - $variables['fn']['fn'][] = $link; + unset($variables['fn']['fn']); + $variables['fn']['fn'] = $link; +// $variables['fn']['fn'][] = $link; }