From fb887ed7d7f2d7025f7f6e7cf26a6e8651596adf Mon Sep 17 00:00:00 2001
From: Rajinsharwar <rajinsharwar@gmail.com>
Date: Sat, 22 Jul 2023 21:59:31 +0600
Subject: [PATCH] Replacing with is_numeric

---
 src/wp-includes/ID3/getid3.lib.php       | 4 ++--
 src/wp-includes/ID3/module.tag.id3v1.php | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/wp-includes/ID3/getid3.lib.php b/src/wp-includes/ID3/getid3.lib.php
index 5242ce643f..79acfdcf6f 100644
--- a/src/wp-includes/ID3/getid3.lib.php
+++ b/src/wp-includes/ID3/getid3.lib.php
@@ -1617,7 +1617,7 @@ class getid3_lib
 							}
 							if (is_array($value) || empty($ThisFileInfo['comments'][$tagname]) || !in_array(trim($value), $ThisFileInfo['comments'][$tagname])) {
 								$value = (is_string($value) ? trim($value) : $value);
-								if (!is_int($key) && !ctype_digit($key)) {
+								if (!is_int($key) && !is_numeric($key)) {
 									$ThisFileInfo['comments'][$tagname][$key] = $value;
 								} else {
 									if (!isset($ThisFileInfo['comments'][$tagname])) {
@@ -1785,7 +1785,7 @@ class getid3_lib
 		}
 		if (isset($commandline)) {
 			$output = trim(`$commandline`);
-			if (ctype_digit($output)) {
+			if (is_numeric($output)) {
 				$filesize = (float) $output;
 			}
 		}
diff --git a/src/wp-includes/ID3/module.tag.id3v1.php b/src/wp-includes/ID3/module.tag.id3v1.php
index b1de25784b..1abeebbd55 100644
--- a/src/wp-includes/ID3/module.tag.id3v1.php
+++ b/src/wp-includes/ID3/module.tag.id3v1.php
@@ -80,7 +80,7 @@ class getid3_id3v1 extends getid3_handler
 				// Since ID3v1 has no concept of character sets there is no certain way to know we have the correct non-ISO-8859-1 character set, but we can guess
 				foreach ($ParsedID3v1['comments'] as $tag_key => $valuearray) {
 					foreach ($valuearray as $key => $value) {
-						if (preg_match('#^[\\x00-\\x40\\x80-\\xFF]+$#', $value) && !ctype_digit((string) $value)) { // check for strings with only characters above chr(128) and punctuation/numbers, but not just numeric strings (e.g. track numbers or years)
+						if (preg_match('#^[\\x00-\\x40\\x80-\\xFF]+$#', $value) && !is_numeric((string) $value)) { // check for strings with only characters above chr(128) and punctuation/numbers, but not just numeric strings (e.g. track numbers or years)
 							foreach (array('Windows-1251', 'KOI8-R') as $id3v1_bad_encoding) {
 								if (function_exists('mb_convert_encoding') && @mb_convert_encoding($value, $id3v1_bad_encoding, $id3v1_bad_encoding) === $value) {
 									$ID3v1encoding = $id3v1_bad_encoding;
-- 
2.39.2.windows.1

