Skip to content

Commit

Permalink
Fix potential type errors
Browse files Browse the repository at this point in the history
  • Loading branch information
campbell-m committed Jun 2, 2024
1 parent 529d072 commit be9c3da
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions web/lib/MRBS/Form/Element.php
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,7 @@ public function toHTML($no_whitespace=false)
{
// boolean attributes, eg 'required', don't need a value
$html .= '="';
if (is_int($value))
if (is_numeric($value))
{
// No need to escape these
$html .= $value;
Expand Down Expand Up @@ -458,7 +458,7 @@ public function toHTML($no_whitespace=false)

private static function escapeText($text, $raw=false)
{
if ($raw || is_int($text))
if ($raw || is_numeric($text))
{
return $text;
}
Expand Down

0 comments on commit be9c3da

Please sign in to comment.