Skip to content

Commit c4e1e5d

Browse files
committed
Fix issue where $field was sent instead of $options, resulting in an error with array_merge
1 parent 1e9a4a1 commit c4e1e5d

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

TextformatterFootnotes.info.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
$info = [
44
"title" => "Footnotes",
5-
"version" => "0.0.2",
5+
"version" => "0.0.3",
66
"summary" => "Adds footnotes using Markdown Extra’s syntax, minus Markdown",
77
"author" => "EPRC",
88
"href" => "https://github.com/eprcstudio/TextformatterFootnotes",

TextformatterFootnotes.module.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public function format(&$str) {
4141
}
4242

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

4747
/**
@@ -72,6 +72,7 @@ public function formatValue(Page $page, Field $field, &$value) {
7272
*/
7373
public function ___addFootnotes($str, $options = [], $field = "") {
7474
if(!$str) return "";
75+
if(!is_array($options)) $options = [];
7576
$defaultOptions = [
7677
"tag" => "div",
7778
"icon" => $this->icon,

0 commit comments

Comments
 (0)