From 347ffe975b21b9737564d6ad6cbcf98d970814eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Re=C3=BCel=20van=20der=20Steege?= Date: Mon, 12 Aug 2024 16:05:10 +0200 Subject: [PATCH] Fix some PHPStan issues. --- src/Number.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Number.php b/src/Number.php index 8def8df..53928b8 100644 --- a/src/Number.php +++ b/src/Number.php @@ -338,7 +338,7 @@ private static function parse_int( $value ) { throw new \InvalidArgumentException( \sprintf( 'Number::parse_int() function only accepts integers. Input was: %s', - \esc_html( \wp_json_encode( $value ) ) + \esc_html( (string) \wp_json_encode( $value ) ) ) ); } @@ -365,7 +365,7 @@ private static function parse_float( $value ) { throw new \InvalidArgumentException( \sprintf( 'Number::from_float() function only accepts floats. Input was: %s', - \esc_html( \wp_json_encode( $value ) ) + \esc_html( (string) \wp_json_encode( $value ) ) ) ); }