From a6096337b5256fea47e841dae018791358878b38 Mon Sep 17 00:00:00 2001 From: Joby Elliott Date: Fri, 8 Sep 2023 23:27:52 +0000 Subject: [PATCH] bug fix comparing enum --- src/Traits/TagTrait.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Traits/TagTrait.php b/src/Traits/TagTrait.php index 25f7593..a33f465 100644 --- a/src/Traits/TagTrait.php +++ b/src/Traits/TagTrait.php @@ -89,10 +89,10 @@ trait TagTrait $strings[] = sprintf('style="%s"', $this->styles()); } foreach ($this->attributes() as $name => $value) { - if ($value == BooleanAttribute::false) { + if ($value === BooleanAttribute::false) { // skip over false boolean attributes continue; - }elseif ($value == BooleanAttribute::true) { + }elseif ($value === BooleanAttribute::true) { // true boolean attributes render as null $strings[] = $name; }elseif (is_string($value) || is_numeric($value) || $value instanceof Stringable) {