Skip to content

Commit

Permalink
Fix issue where $field was sent instead of $options, resulting in an …
Browse files Browse the repository at this point in the history
…error with array_merge
  • Loading branch information
romaincazier committed Apr 10, 2023
1 parent 1e9a4a1 commit c4e1e5d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion TextformatterFootnotes.info.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

$info = [
"title" => "Footnotes",
"version" => "0.0.2",
"version" => "0.0.3",
"summary" => "Adds footnotes using Markdown Extra’s syntax, minus Markdown",
"author" => "EPRC",
"href" => "https://github.com/eprcstudio/TextformatterFootnotes",
Expand Down
3 changes: 2 additions & 1 deletion TextformatterFootnotes.module.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public function format(&$str) {
}

public function formatValue(Page $page, Field $field, &$value) {
$value = $this->addFootnotes($value, $field);
$value = $this->addFootnotes($value, [], $field);
}

/**
Expand Down Expand Up @@ -72,6 +72,7 @@ public function formatValue(Page $page, Field $field, &$value) {
*/
public function ___addFootnotes($str, $options = [], $field = "") {
if(!$str) return "";
if(!is_array($options)) $options = [];
$defaultOptions = [
"tag" => "div",
"icon" => $this->icon,
Expand Down

0 comments on commit c4e1e5d

Please sign in to comment.