From 194971df7cff1ba4abf8e83b09c6bcd6ebbe2ed1 Mon Sep 17 00:00:00 2001 From: RedLucas Date: Thu, 29 Jun 2017 17:01:18 -0700 Subject: [PATCH 1/2] Make the Attributes parameter have a default param I ran into an issue with this because it was expecting a third parameter, which isn't necessarily necessary. --- dist/functions/link.function.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dist/functions/link.function.php b/dist/functions/link.function.php index 4133163..0ac71d6 100755 --- a/dist/functions/link.function.php +++ b/dist/functions/link.function.php @@ -2,7 +2,7 @@ $function = new Twig_SimpleFunction( 'link', - function ($title, $url, $attributes) { + function ($title, $url, $attributes = NULL) { if (isset($attributes) && isset($attributes['class'])) { $classes = join(' ', $attributes['class']); return '' . $title . ''; From 056cc6f96cb4a89e540b8e680bf638caa5da46bc Mon Sep 17 00:00:00 2001 From: Lucas Rasmussen Date: Mon, 19 Mar 2018 14:58:33 -0700 Subject: [PATCH 2/2] Change form NULL to empty array. --- dist/functions/link.function.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dist/functions/link.function.php b/dist/functions/link.function.php index 0ac71d6..aac6af0 100755 --- a/dist/functions/link.function.php +++ b/dist/functions/link.function.php @@ -2,7 +2,7 @@ $function = new Twig_SimpleFunction( 'link', - function ($title, $url, $attributes = NULL) { + function ($title, $url, $attributes = []) { if (isset($attributes) && isset($attributes['class'])) { $classes = join(' ', $attributes['class']); return '' . $title . '';