fix empty attributes being generated
authorEduardo <[email protected]>
Thu, 30 Nov 2023 12:58:23 +0000 (13:58 +0100)
committerEduardo <[email protected]>
Thu, 30 Nov 2023 12:58:23 +0000 (13:58 +0100)
page-generator/generator.php

index 4a1129ba0939e8ee6838d6631617c8b814841dd2..afaea9ae2cde09d35ef400aef61d4567019c9e3f 100644 (file)
@@ -103,7 +103,7 @@ class CodeGenerator
     {
         $html = "<span";
 
-        if (!is_null($class)) {
+        if (!empty($class)) {
             $html .= ' class="' . implode(' ', $class) . '"';
         }
 
@@ -119,13 +119,13 @@ class CodeGenerator
     {
         $html = "<a";
 
-        if (!is_null($class)) {
+        if (!empty($class)) {
             $html .= ' class="' . implode(' ', $class) . '"';
         }
 
         $html .= " href='$url'";
 
-        if (!is_null($title)) {
+        if (!empty($title)) {
             $html .= " title='$title'";
         }