Allow null in html_colour.
This commit is contained in:
parent
105492154e
commit
0693b4a588
1 changed files with 3 additions and 1 deletions
|
@ -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';
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue