Skip to content

Commit c9b9079

Browse files
mattfarinagoetas
authored andcommitted
The element mask is 0 rather than false if element not fount.
1 parent 8dca125 commit c9b9079

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/HTML5/Elements.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -557,7 +557,7 @@ public static function isElement($name)
557557
* @param string $name
558558
* The name of the element.
559559
*
560-
* @return int|bool The element mask or false if element does not exist.
560+
* @return int The element mask.
561561
*/
562562
public static function element($name)
563563
{
@@ -571,7 +571,7 @@ public static function element($name)
571571
return static::$mathml[$name];
572572
}
573573

574-
return false;
574+
return 0;
575575
}
576576

577577
/**

test/HTML5/ElementsTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,7 @@ public function testElement()
351351
'baz'
352352
);
353353
foreach ($nonhtml5 as $element) {
354-
$this->assertFalse(Elements::element($element));
354+
$this->assertEquals(0, Elements::element($element));
355355
}
356356
}
357357

0 commit comments

Comments
 (0)