Skip to content

Commit 347ffe9

Browse files
committed
Fix some PHPStan issues.
1 parent 5e3574f commit 347ffe9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Number.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,7 @@ private static function parse_int( $value ) {
338338
throw new \InvalidArgumentException(
339339
\sprintf(
340340
'Number::parse_int() function only accepts integers. Input was: %s',
341-
\esc_html( \wp_json_encode( $value ) )
341+
\esc_html( (string) \wp_json_encode( $value ) )
342342
)
343343
);
344344
}
@@ -365,7 +365,7 @@ private static function parse_float( $value ) {
365365
throw new \InvalidArgumentException(
366366
\sprintf(
367367
'Number::from_float() function only accepts floats. Input was: %s',
368-
\esc_html( \wp_json_encode( $value ) )
368+
\esc_html( (string) \wp_json_encode( $value ) )
369369
)
370370
);
371371
}

0 commit comments

Comments
 (0)