From 0693b4a58883db7dd1640c50c6281e732e6f6a63 Mon Sep 17 00:00:00 2001 From: flashwave Date: Mon, 23 Jul 2018 15:31:36 +0200 Subject: [PATCH] Allow null in html_colour. --- utility.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/utility.php b/utility.php index ddf608dc..7bc00cbf 100644 --- a/utility.php +++ b/utility.php @@ -293,8 +293,10 @@ function html_link(string $url, ?string $content = null, $attributes = []): stri return $html; } -function html_colour(int $colour, array $attribs = []): string +function html_colour(?int $colour, array $attribs = []): string { + $colour = $colour ?? colour_none(); + if (!$attribs) { $attribs['color'] = '%s'; }